Wpf Window resizes when computer is locked.
Posted
by Chris
on Stack Overflow
See other posts from Stack Overflow
or by Chris
Published on 2010-02-18T16:38:25Z
Indexed on
2010/05/19
21:30 UTC
Read the original article
Hit count: 168
I have a Window set to the height and width of my monitors:
var r = System.Drawing.Rectangle.Union( System.Windows.Forms.Screen.AllScreens[0].Bounds, System.Windows.Forms.Screen.AllScreens[1].Bounds );
Height = r.Height;
Width = r.Width;
This is all fine until I Lock my computer (WIN+L), when I come back the window has resized itself to be on one monitor only.
What I want to do is prevent the decrease in size, as I'm drawing on a canvas on the second monitor, and when the resize occurs, this is all lost..
Any thoughts on how I can prevent this?
Cheers!
© Stack Overflow or respective owner