How to get the header of the parent node of a selected TreeViewItem?
- by Dabblernl
I have this TreeView:
Main Node Header="Main"
Sub Node Header="Sub1"
Final Node Header="Item1"
Final Node Header="Item2"
Sub Node Header="Sub 2"
Final Node Header="Item1"
Final Node Header="Item2"
I have two textboxes that are bound to this TreeView. One has its Text property bound to the TreeView's SelectedItem property and works OK.
The other TextBox I want to bind to the Header text of the Sub Node directly above the selected Item.
How do I reference it?