I've got a TreeView that uses a HierarchicalDataTemplate and a view model as data context on different nodes. I want to access some TreeViewItem properties from TreeView.SelectedItem - but this returns a view model object not a TreeViewItem.
How to get a TreeViewItem ref to selected item?
(Ive the same problem in SelectedItemChanged handlers - object sender is a view model - how to get TreeViewItem?)
[There is a TreeView property SelectedContainer which returns a TreeViewItem but its not accessable :-( ]
This is the kind of frustrating thing about WFP is that is easy to get stuck on this kind of "detail" and it seems like there must be an easy/obvious solution but...