IsSnapToTick + Incerease/Decrease Handles

2 posts, 0 answers
  1. Maurizio
    Maurizio avatar
    43 posts
    Member since:
    Jan 2012

    Posted 09 Nov 2015 Link to this post

    Clicking on the Decrease/Increase Handles of a RadSlider normally changes the Slider by the amount of SmallChange.

    But what if I have IsSnapToTickEnabled=True and ticks are not equidistant? In this case the buttons don't work properly. For example:



    Minimum="0" Maximum="10"



    Ticks="2,4,8,13" />


    leads to the problem that Increase ​Handle works well when navigating from tick 2 to 4, but then nothing more happens and no further click will bring the thump to tick 8 and 13. This is an incorrect behaviour, or am I wrong?


    Peter, Germany


  2. Dinko
    Dinko avatar
    181 posts

    Posted 12 Nov 2015 Link to this post

    Hi Peter,

    This  behavior is expected by design - when the IsSnapToTickEnabled property is set to true, the value will be automatically coerced to the nearest Tick value. In your case, the SmallChange property is set to 2. Clicking any of the handles will increase/decrease the value by the amount specified in that property. After tick 4, the thumb will try to move to 6 but this thick is not specified in the Ticks property so will go back.

    As a workaround, you can create your custom layout using a RepeatButton element to implement the desired functionality.  I have attached a sample project demonstrating this approach.

    If you need further assistance don't hesitate to contact us again.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top