开发者

Event that fires after element is resized

Here is a problem: after loading some visual elements, I need to change something knowing their new sizes. There is MeasureOverride method, but it is called before changing the 开发者_运维百科size. Is there any method that is called after it?

P.S. I know that I can calculate new sizes having old ones, but new sizes aren't calculated simply. It would be much easier to just use such an event (if it exists).


Are you looking for the FrameworkElement.SizeChanged event?

MSDN's description:

Occurs when either the ActualHeight or the ActualWidth properties change value on a FrameworkElement.

EDIT:

This article has a good description of both the SizeChanged and LayoutUpdated events, including an overview of how the layout loop works.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜