开发者

Content Resized event for WPF app

For some scaling recalculation in a Silverlight application I use the following event:

 App.Current.Host.Content.Resized += new EventHandler(Content_Resized);

I'd like to use a similar 开发者_StackOverflowevent in a WPF application, but can not figure out what it should be.

What is an equivalent of Silverlight's App.Current.Host.Content.Resized for a WPF application?


WPF can have multiple windows which are not hosted anywhere, that is why there is no respective property in the Application class, if you have a conceptual main window you can set the application's MainWindow property and handle Application.Current.MainWindow.SizeChanged instead.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜