本文介绍了防止 WPF TreeView 的 SelectedItemChanged 事件冒泡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 WPF TreeView
触发一个 SelectedItemChanged
事件.每当我在 TreeView
中选择一个项目时,SelectedItemChanged
事件都会为所选项目以及树中所有所选节点的祖先触发.
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.
如何防止 SelectedItemChanged
事件多次触发?
How do I prevent the SelectedItemChanged
event from firing more than once?
推荐答案
编辑
作为此主题的更新,请查看此博客 发帖.
As an update to this subject, view this blog post.
这篇关于防止 WPF TreeView 的 SelectedItemChanged 事件冒泡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!