需要在wpf中的路由事件中提供帮助 [英] need help in routed event in wpf

查看:56
本文介绍了需要在wpf中的路由事件中提供帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于路由事件和routed.situation类型的示例,以便在wpf中使用路由事件

example on routed event and type of routed.situation to use the routed event in wpf

推荐答案

WPF中的路由事件基本上有三种类型。



直接事件是例如标准事件一个按钮引发一次点击。



冒泡事件由源控件引发,然后向上移动到可视树,直到它由另一个控件处理,例如单击单元格内的按钮可以遍历网格级别。



隧道事件反向工作,在根级别的控件处引发并且向下直观的树,直到他们击中源元素。



你真的不需要使用这些事件的情况。当你使用WPF时,它们一直在发生。
Routed events in WPF are basically of three types.

Direct events are standard events for e.g. a button raises a click.

Bubbling events are raised by a source control and then moved up the visual tree till it is handled by another control e.g. a click on a button inside a cell could traverse upto grid level.

Tunneling events work reverse and are raised at the control at root level and travel down the visual tree till they hit the source element.

You don''t really need a situation to use these events. They are happening all the time when you use WPF.




看到这个项目:

http://www.wpftutorial.net/RoutedEvents.html [ ^ ]

或者这一个

http://msdn.microsoft.com/en-us/magazine/cc785480.aspx [ ^ ]

祝你好运
Hi,
See this item:
http://www.wpftutorial.net/RoutedEvents.html[^]
or this one
http://msdn.microsoft.com/en-us/magazine/cc785480.aspx[^]
Best regards


这篇关于需要在wpf中的路由事件中提供帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆