简体   繁体   English

WPF如果sizechanged事件没有冒泡,它会隧道吗?

[英]WPF if sizechanged event does not bubble, does it tunnel?

I noted that according to: http://msdn.microsoft.com/en-us/library/system.windows.frameworkelement.sizechanged%28v=vs.95%29.aspx 我注意到根据: http//msdn.microsoft.com/en-us/library/system.windows.frameworkelement.sizechanged%28v=vs.95%29.aspx

the sizechanged event does not bubble upwards to parent elements. sizechanged事件不会向上冒泡到父元素。 Does it tunnel downward then? 它向下隧道吗? I'm just curious how sizechanged works exactly. 我只是好奇大小是如何工作的。 After a size on an element changes, does the event propagate in some direction until it is handled? 在元素上的大小发生变化后,事件是否会在某个方向上传播直到它被处理? if it doesn't propagate then how is it a routed event. 如果它没有传播那么它是如何路由事件的。

There is actually 3rd routing strategy . 实际上有第三种路由策略 Direct events which neither bubble nor tunnel and are raised only by one control and FrameworkElement.SizeChanged is exactly one of these events. 既不冒泡也不隧道且仅由一个控件和FrameworkElement.SizeChanged引发的直接事件就是这些事件中的一个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM