Custom content doesn't show Tooltip

2 posts, 0 answers
  1. Ben
    Ben avatar
    2 posts
    Member since:
    Sep 2011

    Posted 07 Nov 2011 Link to this post

    Hi all,

    I'm using the TimeBar with custom content.
    Rectangles are being added at certain positions.
    The problem is that I can't get the ToolTips for the Rectangles to show up.

    <Grid x:Name="TimeBarGrid">
    <ItemsControl ItemsSource="{Binding timeBarSource}">
        <ItemsControl.ItemsPanel>
    <ItemsPanelTemplate>
     <Canvas Width="{Binding ElementName=TimeBarGrid, Path=Width}"
                         Height="{Binding ElementName=TimeBarGrid, Path=Height}"/>
     </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>
        <ItemsControl.ItemTemplate>
     <DataTemplate>
     <Rectangle Width="{Binding Path=Width}"
                           Height="{Binding Path=Height}"
                           Fill="{Binding Path=Fill}">
                   <ToolTipService.ToolTip>
                         <ToolTip MaxWidth="300">
                                <TextBlock>testing</TextBlock>
                                 </ToolTip>
                           </ToolTipService.ToolTip>
                     </Rectangle>
               </DataTemplate>
         </ItemsControl.ItemTemplate>
     </ItemsControl>
    </Grid>

    Thanks in advance,
    Ben
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 09 Nov 2011 Link to this post

    Hi Ben,
    The result you describe is expected, because when you move the mouse above the content of the timeBar, you are actually moving the mouse over the item intervals. You can check this in our First look online demo - http://demos.telerik.com/silverlight/#TimeBar/FirstLook. Moving the mouse over the content area, marks one item interval as hovered, thus indicating the selection, in case the user clicks this item interval.

    You can re-template the timeBar, in order to change this behavior. However, you might run into problems as the timeBar was not intended to work this way,

    All the best,
    Tsvetie
    the Telerik team

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

  3. DevCraft banner
Back to Top