Text in special slots

2 posts, 0 answers
  1. Ivo
    Ivo avatar
    48 posts
    Member since:
    Jul 2011

    Posted 08 Dec 2011 Link to this post


    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?
  2. Rosi
    Rosi avatar
    2529 posts

    Posted 13 Dec 2011 Link to this post

    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 >>

Back to Top