views:

20

answers:

1

Hi all 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 selection 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!

A: 

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.

Guge