ToolTip not displayed inside Popup

2 posts, 0 answers
  1. Marc-Andre
    Marc-Andre avatar
    8 posts
    Member since:
    Sep 2007

    Posted 27 Apr 2012 Link to this post

    Hi,

    Using version 2012.1.326.40 of the DataVisualization control, the ToolTip is not displayed when the RadTimeline is inside a Popup. Mouse hovering over individual items works. Any ideas?

    The code below illustrates my symptoms.

    <Window x:Class="WpfApplication3.MainWindow"
            xmlns:example="clr-namespace:WpfApplication3"
            Title="MainWindow" Height="350" Width="525">
        <Window.DataContext>
            <example:ExampleViewModel />
        </Window.DataContext>
        <Grid>
             
            <Popup IsOpen="True" Width="800" Height="300">
            <telerik:RadTimeline Grid.Row="0"
                                     PeriodStart="{Binding StartDate, Mode=TwoWay}"
                                     PeriodEnd="{Binding EndDate, Mode=TwoWay}"
                                     VisiblePeriodStart="{Binding VisibleStartDate, Mode=TwoWay}"
                                     VisiblePeriodEnd="{Binding VisibleEndDate, Mode=TwoWay}"
                                     StartPath="StartDate"
                                     DurationPath="Duration"
                                     ToolTipPath="Details"
                                     ItemsSource="{Binding Data}">
                <telerik:RadTimeline.Intervals>
                    <telerik:DayInterval />
                    <telerik:YearInterval IntervalSpans="1,5" />
                    <telerik:MonthInterval IntervalSpans="1,6" />
                </telerik:RadTimeline.Intervals>
            </telerik:RadTimeline>
     
            </Popup>
        </Grid>
    </Window>
     
  2. Marc-Andre
    Marc-Andre avatar
    8 posts
    Member since:
    Sep 2007

    Posted 27 Apr 2012 Link to this post

    For those lost souls struggling with this issue, a simple workaround is to use a template for the InstantItem or DurationItem such as this:

    <Window.Resources>
            <DataTemplate x:Key="InstantItemTemplate">
                <Border>
                    <Button Height="16"
                        Width="16"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        ToolTip="{Binding DataItem.Details}" Click="Button_Click" CommandParameter="{Binding DataItem}">
                    </Button>
                </Border>
            </DataTemplate>
        </Window.Resources>
     
     
     <telerik:RadTimeline Grid.Row="0"
                                     PeriodStart="{Binding StartDate, Mode=TwoWay}"
                                     PeriodEnd="{Binding EndDate, Mode=TwoWay}"
                                     VisiblePeriodStart="{Binding VisibleStartDate, Mode=TwoWay}"
                                     VisiblePeriodEnd="{Binding VisibleEndDate, Mode=TwoWay}"
                                     StartPath="StartDate"
                                     DurationPath="Duration"
                                     TimelineInstantItemTemplate="{StaticResource InstantItemTemplate}"
                                     ItemsSource="{Binding Data}">
                <telerik:RadTimeline.Intervals>
                    <telerik:DayInterval />
                    <telerik:YearInterval IntervalSpans="1,5" />
                    <telerik:MonthInterval IntervalSpans="1,6" />
                </telerik:RadTimeline.Intervals>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top