WPF if sizechanged event does not bubble, does it tunnel?


Tags: c# wpf xaml layout
标签: c# wpf xaml layout

问题 (Question)

I noted that according to: 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. 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.



最佳答案 (Best Answer)

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.