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

Problem with TickTemplate in RadSlider

3 Answers 77 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
hwsoderlund
Top achievements
Rank 1
hwsoderlund asked on 23 Jul 2008, 01:08 PM
I've been trying to set the TickTemplate of the RadSlider component like the following:

<telerikbase:RadSlider  
    TickTemplate="{StaticResource RadTickTemplate}" 
    Ticks="{Binding CustomDataPredefinedValues}" 
    TickPlacement="TopLeft"  
    TickFrequency="1"  
    IsSnapToTickEnabled="True" 
    IsMoveToPointEnabled="True" 
    SmallChange="1" LargeChange="1"
</telerikbase:RadSlider> 

And then, in the resources:
<DataTemplate x:Key="RadTickTemplate"
    <Rectangle Width="5" Height="6" Fill="Black"></Rectangle> 
</DataTemplate> 

However, this doesn't appear to work. I finally got it working by using the TickTemplateSelector, like in the sample application, but that seems far from ideal. Is this a known bug, or am I doing something wrong?

3 Answers, 1 is accepted

Sort by
0
hwsoderlund
Top achievements
Rank 1
answered on 23 Jul 2008, 01:14 PM
Just to clarify: Nothing crashes with the above code. The template just doesn't appear.
0
Accepted
Kiril Stanoev
Telerik team
answered on 23 Jul 2008, 02:01 PM
Hi Henrik,

I was not able to reproduce the problem you are experiencing. Please take a look at the sample project that I have attached and tell me whether it is like yours. I used the latest assemblies of RadControls for Silverlight 2, which will be officially available for download after several hours and it is possible that you struggle with a bug which has been already fixed.

In the project I have a simple class with a CustomDataPredefinedValues property that is of type DoubleCollection. In the Page constructor I create an instance of the class and populate its CustomDataPredefinedValues property with double values. At the end, the class is given as DataContext to the Page.

If you experience any additional problems, please, do not hesitate to contact us.

Greetings,
Kiril
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
hwsoderlund
Top achievements
Rank 1
answered on 23 Jul 2008, 03:00 PM
Yes, it's exactly the same. Your example didn't include the updated assembly, so I compiled it against my version, and it shows nothing for the ticks. So if it's working on your machine I'm confident it will work when the update is released. Thank you for your help.
Tags
General Discussions
Asked by
hwsoderlund
Top achievements
Rank 1
Answers by
hwsoderlund
Top achievements
Rank 1
Kiril Stanoev
Telerik team
Share this question
or