积极答复者
TabControl 定义的SelectionChanged事件,为什么里面的各种select控件selectionchanged的时候都会施行为TabControl定义的SelectionChanged事件

问题
答案
-
路由事件啦,看概念先:http://msdn.microsoft.com/zh-cn/library/ms742806.aspx
然后用这个代码吧不是TabControl触发的事件过滤掉
void subNav_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.OriginalSource != subNav) return; // TO DO: your code here }
Sincerely,
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Jie BaoModerator 2011年8月10日 14:14
-
了解一下隧道事件 比如PreviewMouseDown 和冒泡事件 比如MouseDown,
WPF里经常需要用到的东西
Hero
- 已标记为答案 Jie BaoModerator 2011年8月10日 14:14
全部回复
-
路由事件啦,看概念先:http://msdn.microsoft.com/zh-cn/library/ms742806.aspx
然后用这个代码吧不是TabControl触发的事件过滤掉
void subNav_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.OriginalSource != subNav) return; // TO DO: your code here }
Sincerely,
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Jie BaoModerator 2011年8月10日 14:14
-
了解一下隧道事件 比如PreviewMouseDown 和冒泡事件 比如MouseDown,
WPF里经常需要用到的东西
Hero
- 已标记为答案 Jie BaoModerator 2011年8月10日 14:14