开发者

TreeView in wpf ... Is there a SelectedItemChanging event?

开发者 https://www.devze.com 2023-01-08 21:17 出处:网络
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 eve

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号