I have a WPF TreeView
which triggers a SelectedItemChanged
event. Whenever I select an item in the TreeView
, the SelectedItemChanged
event is triggered for the selected item and all of the selected node's ancestors in the tree.
How do I prevent the SelectedItemChanged
event from firing more than once?
来源:https://stackoverflow.com/questions/1127614/preventing-wpf-treeviews-selecteditemchanged-event-from-bubbling