Can someone please help me to know how I can add tooltip for Treeview control on hover?
Asked
Active
Viewed 116 times
1
-
Please provide enough code so others can better understand or reproduce the problem. – Community Sep 22 '22 at 23:49
1 Answers
2
You just need to bind it or set directly to ToolTipService.ToolTip
.
<TreeView
Grid.Column="0"
ItemsSource="{x:Bind ViewModel.Items, Mode=OneWay}">
<TreeView.ItemTemplate>
<DataTemplate x:DataType="local:Item">
<TreeViewItem
Content="{x:Bind Name}"
ItemsSource="{x:Bind Children}"
ToolTipService.ToolTip="{x:Bind Tip, Mode=OneWay}" />
</DataTemplate>
</TreeView.ItemTemplate>
</TreeView>

Andrew KeepCoding
- 7,040
- 2
- 14
- 21