Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Slider > Retrive click on slider position

Answered Retrive click on slider position

Feed from this thread
  • David avatar

    Posted on Jan 2, 2011 (permalink)

    Hello,

    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

    Reply

  • Answer Petar Mladenov Petar Mladenov admin's avatar

    Posted on Jan 3, 2011 (permalink)

    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

    Reply

  • Peter avatar

    Posted on Dec 13, 2011 (permalink)

    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?

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Dec 16, 2011 (permalink)

    Hi Peter,

     You are right as long as you don't use Ticks. Consider the following scenario:

    <telerik:RadSlider Width="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 >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Slider > Retrive click on slider position
Related resources for "Retrive click on slider position"

WPF Slider Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]