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

Text in special slots

1 Answer 42 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Tim asked on 08 Dec 2011, 02:33 PM

I am using special slots in timeline to mark public holidays etc... Thus I need the possibility to add some detail information to the special slot like adding a text "Independance day". I read in another post that tooltips are not possible in special slots. Is that still true?

So, what I tried to achieve is adding a textblock to my special day style "template" property. This works when I have a fixed text in there, but I am having trouble binding the text to the custom special slot class. As I read in the docs the DataContext of a special slot is of type DecorationBlock. Thus, tried with:

               <Style TargetType="telerik:HighlightItem" BasedOn="{StaticResource HighlightItemStyle}">
                   <Setter Property="Margin" Value="0,0,0,0" />
                   <Setter Property="Template">
                               <Border Background="Red" Opacity="0.5" >
                                   <TextBlock Text="{Binding Slot.Reason}" />

What am I doing wrong? Maybe, there is another way to add some text to a special block?

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 13 Dec 2011, 10:13 AM
Hi Stefan,

I guess you have custom implementation of the Slot class. That is why I suggest you override the Copy and CopyFrom methods as it is shown here.

the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question