Is it possible somehow to bind the Ticks source to a list of strings? For example A, B, C, D, E etc
I want to use the slider to change between different modes rather then just use its numerical values :)
Kind regards
Christopher
1 Answer, 1 is accepted
0
Pavel R. Pavlov
Telerik team
answered on 25 Jul 2013, 03:22 PM
Hello Christopher,
Unfortunately, this is not supported out of the box. However you can bind the ThickTemplate property of the RadSlider control as described in this article. Furthermore, you can use a converter to return the desired strings like this:
XAML
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
switch (value.ToString())
{
case "0": return "Your first string";
case "1": return "Your second strig";
//more cases
default:
return "default";
}
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
#endregion
}
I hope this will help you.
Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely. Sign up for Free application insights >>