WPF: Slider doesnt raise MouseLeftButtonDown or MouseLeftButtonUp

后端 未结 4 1958
傲寒
傲寒 2021-01-04 01:02

I tried this XAML:



        
4条回答
  •  攒了一身酷
    2021-01-04 01:22

    Try using LostMouseCapture and GotMouseCapture.

        private void sliderr_LostMouseCapture(object sender, MouseEventArgs e)
    
        private void slider_GotMouseCapture(object sender, MouseEventArgs e)
    

    GotMouseCapture fires when the user begins dragging the slider, and LostMouseCapture when he releases it.

提交回复
热议问题