1

Can someone please help me to know how I can add tooltip for Treeview control on hover?

Treeview control

1 Answers1

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