Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF Slider problems

Tags:

c#

wpf

slider

I have seen this behaviour, on an old win32 app, where when you hold down the mouse at some position on the slider track (other than on the thumb), the thumb moves to that position.

In WPF what seems to be happening is the thumb moves a distance defined either by SmallChange or LargeChange. If you keep holding, it moves by SmallChange/LargeChange again after some time as defined by the Delay property.

Now I want to get the old behaviour? So if the thumb is at 2 and I press the mouse down near 10 I want it to jump to 10. Whats the best way to do this?

Thanks in advance for any suggestions.

like image 472
Sharun Avatar asked Dec 18 '22 09:12

Sharun


1 Answers

Slider.IsMoveToPointEnabled

I dont know how many times I went through all the properties before finding it.

like image 71
Sharun Avatar answered Dec 31 '22 10:12

Sharun