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

Add tooltip to Timeline Period

1 Answer 146 Views
TimeLine
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 22 Oct 2013, 04:27 PM
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?

1 Answer, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 24 Oct 2013, 07:57 AM
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..."/>
</Style>

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.

Regards,
Petar Kirov
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 >>
Tags
TimeLine
Asked by
James
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Share this question
or