Hi,
I have defined a custom tooltip for RadTreeView. Also I have used HierarchicalDataTemplate for my RadTreeView. Code is as shown below.
<telerik:RadTreeView Margin="8" IsDragDropEnabled="True" Name="CollExperimentTreeView" SelectedItem="{Binding ActiveExp, Mode=TwoWay}"
SelectionMode="Single" IsSingleExpandPath="False" IsLineEnabled="True" VerticalAlignment="Stretch"
temTemplate="{StaticResource TreeViewTemplate}" ItemsSource ="{Binding TreeViewCollection, Mode=TwoWay}" />
Custom tooltip and HierarchicalDataTemplate defined as below:
<UserControl.Resources>
<Style TargetType="{x:Type telerik:RadTreeViewItem}">
<Setter Property="ToolTip" >
<Setter.Value>
<ToolTip>
<ToolTip.Content>
<StackPanel Orientation="Vertical">
<StackPanel Orientation ="Horizontal">
<TextBlock Text="Started: " />
<TextBlock Text="{Binding StartDate}" />
</StackPanel>
<StackPanel Orientation ="Horizontal">
<TextBlock Text="Last Changed: " />
<TextBlock Text="{Binding LastAccess}" />
</StackPanel>
<TextBlock Text="{Binding Description}" />
</StackPanel>
</ToolTip.Content>
</ToolTip>
</Setter.Value>
</Setter>
</Style>
<HierarchicalDataTemplate x:Key="TreeViewTemplate" ItemsSource="{Binding Path=Experiments}">
<TextBlock VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Text="{Binding Name}" />
</HierarchicalDataTemplate>
</UserControl.Resources>
I do not want to display tooltip for those nodes that shows TextBlock containing Name,( HierarchicalDataTemplate )
Please help
Thanks
I have defined a custom tooltip for RadTreeView. Also I have used HierarchicalDataTemplate for my RadTreeView. Code is as shown below.
<telerik:RadTreeView Margin="8" IsDragDropEnabled="True" Name="CollExperimentTreeView" SelectedItem="{Binding ActiveExp, Mode=TwoWay}"
SelectionMode="Single" IsSingleExpandPath="False" IsLineEnabled="True" VerticalAlignment="Stretch"
temTemplate="{StaticResource TreeViewTemplate}" ItemsSource ="{Binding TreeViewCollection, Mode=TwoWay}" />
Custom tooltip and HierarchicalDataTemplate defined as below:
<UserControl.Resources>
<Style TargetType="{x:Type telerik:RadTreeViewItem}">
<Setter Property="ToolTip" >
<Setter.Value>
<ToolTip>
<ToolTip.Content>
<StackPanel Orientation="Vertical">
<StackPanel Orientation ="Horizontal">
<TextBlock Text="Started: " />
<TextBlock Text="{Binding StartDate}" />
</StackPanel>
<StackPanel Orientation ="Horizontal">
<TextBlock Text="Last Changed: " />
<TextBlock Text="{Binding LastAccess}" />
</StackPanel>
<TextBlock Text="{Binding Description}" />
</StackPanel>
</ToolTip.Content>
</ToolTip>
</Setter.Value>
</Setter>
</Style>
<HierarchicalDataTemplate x:Key="TreeViewTemplate" ItemsSource="{Binding Path=Experiments}">
<TextBlock VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Text="{Binding Name}" />
</HierarchicalDataTemplate>
</UserControl.Resources>
I do not want to display tooltip for those nodes that shows TextBlock containing Name,( HierarchicalDataTemplate )
Please help
Thanks