In our WPF applicaiton, we're using WindowStyle="None" in order to give our application a more custom look. The maximize/minimize buttons are in the same place, but styled the way we want them.
As such, we're hijacking the maximize and minimize behavior and doing it manually. We're doing the following:
this.Top = myScreen.WorkingArea.Top;
this.Left = myScreen.WorkingArea.Left;
this.Width = myScreen.WorkingArea.Width;
this.Height = myScreen.WorkingArea.Height;
Here, myScreen is the Screen where the center point of the application lies, in the event the user is running on a multi-monitor setup.
On certain setups, and with seemingly no connection, hitting the maximize button will extend the size of the application way past the actual, viewable area of the monitor. It fails this way on my and another developers setup, but my bosses multi-monitor setup it works just fine.
My monitor setup is as follows:
Monitor 2 (left)
Top, Left: 0, -1280
Resolution: 1280, 1024
Monitor 1 (right, laptop)
Top, Left: 0, 0
Resolution: 1680, 1050
When I manually resize the application to the size it should be when maximized, I get the following values:
Top, Left: 0, -1024
Height, Width: 792, 1024
I fairly recently updated the display drivers on my laptop, and no newer ones exist. Other than that I can't explain this phenomenon. Does anyone else have any experience with this? Is this perhaps a dots-per-pixel conversion issue or something? I can't find any answers from here or searching google... Any help would be greatly appreciated!