I am making use of a System.Windows.Controls.TreeView in a wpf application.
Basically I need the equivalent of a SelectedItemChanging event so that I can cancel the the selectio开发者_Python百科n event of the treeview.
Is there a way to do this? I was not able to find something called SelectedItemschanging event on a treeview.
Thanks!
I found an article on how to do treeview item selection by code.
You could use the techniques from that article in conjunction with the NewValue and OldValue members of the RoutedPropertyChangedEventArgs in SelectedItemChanged.
精彩评论