I wanted to know how can I make the slider thumb to jump to the position where I click on the slider. In other words, how can I retrieve the value where the user clicked on the slider (and then I could set the slider's value).
Thank you
3 Answers, 1 is accepted
0
Accepted
Petar Mladenov
Telerik team
answered on 03 Jan 2011, 03:36 PM
Hi David,
In order to move the thumb with one mouse click only, you can set IsMoveToPointEnabled="True". Feel free to ask if you need further assistance.
Best wishes,
Petar Mladenov
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
I cannot see any difference, no matter if I set IsMoveToPointEnabled to true or false. In any case the thumb moves to the position that I clicked on.
Is there an event, that is fired when I click on the slider and the thump moves to that position? Or do I have to subscribe to the normal Click event and then find out myself if the thumb moved or not?
0
Petar Mladenov
Telerik team
answered on 16 Dec 2011, 03:15 PM
Hi Peter,
You are right as long as you don't use Ticks. Consider the following scenario:
<telerik:RadSliderWidth="400"
Height="30"
IsMoveToPointEnabled="false"
Maximum="10"
Ticks="2,4,6,8"/>
This way clicking somewhere in the slider won't always move the Thumb under your Mouse pointer.
As for your actual question, I suggest you to use IsMoveToPointEnabled to true and the ValueChanged event.
Furthermore, you can drag the Thumb and slide it and you can get the ValueChanged event fire only once , at the end of the drag process. This can be accomplished by setting IsDeferredDraggingEnabled to true.
Best wishes,
Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>