I'm using a slider control in WPF to show how much of a file has been read, and to control where to read the file from.
The slider binds its Value to a int ProgressValue. I use a timer to look at the current read percentage and set the ProgressValue appropriately. The slider moves to the desired position. As more of the file is read, the slider moves to the right.
But how do I detect that the user has clicked on the slider and is moving it around, so I can seek my file to the desired offset? I tried to add handlers to MouseLeftButtonDown, DragEnter, DragLeave and DragOver but they don't get called when I click and drag the slider around. This is the current slider's XAML:
<Slider x:Name="sliderProgress" TickPlacement="BottomRight" TickFrequency="1000" Minimum="0" Maximum="1000" Value="{Binding ProgressValue1000}" Style="{DynamicResource SliderStyle1}" HorizontalAlignment="Left" Width="478" MouseLeftButtonDown="onSliderLeftButtonDown" />