开发者

Remember and restore WPF window's scren, WindowState and position?

开发者 https://www.devze.com 2023-03-04 12:14 出处:网络
As part of my application settings, I store the last position on the workspace of the window and it\'s WindowState. I can successfully rest开发者_如何学JAVAore the position, even on another screen, bu

As part of my application settings, I store the last position on the workspace of the window and it's WindowState. I can successfully rest开发者_如何学JAVAore the position, even on another screen, but one thing I can't... Maximize the application on a non-primary screen.

So, if my application closes when maximized on screen 2, I want to restore it maximized on screen 2.

How do I do this?


You have to do it in the loaded event. See: http://mostlytech.blogspot.com/2008/01/maximizing-wpf-window-to-second-monitor.html

0

精彩评论

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