Add tooltip to Timeline Period

2 posts, 0 answers
  1. James
    James avatar
    1 posts
    Member since:
    Oct 2013

    Posted 22 Oct 2013 Link to this post

    I am trying to add a tooltip to the timeline period (area showing dates above the intervals).  I have tried setting the HeaderStyle for the TimelinePeriodControl, but haven't had any luck seeing results from that.  As far as I can tell, the TimelinePeriodControl doesn't support tooltips.  Any suggestions?
  2. Petar Kirov
    Petar Kirov avatar
    425 posts

    Posted 24 Oct 2013 Link to this post

    Hi James,

    Generally speaking, you can enable tooltips over the Timeline Period controls like this:
    <Style TargetType="telerik:TimelinePeriodControl"
         BasedOn="{StaticResource TimelinePeriodControlStyle}">
        <Setter Property="ToolTip" Value="Test tooltip..."/>

    However, due to the fact that the TimelineItemContainer is placed over the TimelinePeriodContainer in the RadTimeline control template, mouse events do not reach the TimelinePeriodContainer and its items (the individual TimelinePeriodControls) and that's why no tooltip will be displayed. The easiest way to change this is to set the Canvas.ZIndex property of the Grid that holds the TimelinePeriodContainer from 100 to 300. (see timeline-template.png).

    Please note that by doing this you will effectively disable the control's selection functionality. If you want to have both tooltips and selection you will need to make more extensive changes in the control template. 

    I have attached a sample project that demonstrates the workaround with ZIndex  (along with a screenshot - timeline-tooltip.png), which you can further customize if you want to make the selection functionality available.

    Petar Kirov
    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 >>
  3. DevCraft R3 2016 release webinar banner
Back to Top