This is a migrated thread and some comments may be shown as answers.

IsSnapToTick + Incerease/Decrease Handles

1 Answer 106 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Maurizio
Top achievements
Rank 2
Maurizio asked on 09 Nov 2015, 12:47 PM

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:

 

<telerik:RadSlider

Minimum="0" Maximum="10"

IsSnapToTickEnabled="True" 

SmallChange="2"

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

 

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 12 Nov 2015, 11:51 AM
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.

Regards,
Dinko
Telerik
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
Tags
Slider
Asked by
Maurizio
Top achievements
Rank 2
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or