I have wpf TreeView -- bound to some data. The Treeview resides on the left hand of a window divided into two areas where the tree is the navigation and a panel on the right side changes content depending on the tree node selected.
Not all the nodes of the treeview produce detail information. I want to disable the selection of those nodes. Any idea?
Thanks
@jama64 : You can achieve what you want if you change the Style from Property IsEnabled to Focusable.
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="Focusable" Value="{Binding HasDetails}"/>
</Style>
</TreeView.ItemContainerStyle>