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

Custom content doesn't show Tooltip

1 Answer 62 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 07 Nov 2011, 09:44 AM
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

1 Answer, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 09 Nov 2011, 04:51 PM
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 >>

Tags
TimeBar
Asked by
Ben
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or