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

Move slider position

2 Answers 338 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Ryan Black
Top achievements
Rank 1
Ryan Black asked on 16 Aug 2010, 06:05 PM
Hello,

I would like to have the Slider thumb control move to the correct position when I set the value programmatically.  How would I go about doing this?

Thanks
Ryan Black

2 Answers, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 19 Aug 2010, 03:21 PM
Hello Ryan Black,

You can data bind the Value property of the RadSlider using the TwoWay mode binding, like so:
<teletik:RadSlider x:Name="mySlider"
                   Minimum="0"
                   Maximum="10"
                   Value="{Binding SliderPosition, Mode=TwoWay}"  />

However, you should keep in mind that the class containing the SliderPosition property should implement INotifyProperyChanged interface in order to fully utilize the TwoWay mode binding.

I prepared a sample project illustrating this approach. Please give it a try and let me know if it works for you.

Kind regards,
Tina Stancheva
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Ryan Black
Top achievements
Rank 1
answered on 19 Aug 2010, 07:18 PM
That worked perfectly.  Thanks
Tags
Slider
Asked by
Ryan Black
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Ryan Black
Top achievements
Rank 1
Share this question
or