I know I can get the size of the primary screen by using
System.Windows.SystemParameters.PrimaryScreenWidth;
System.Windows.SystemParameters.PrimaryScreenHeight;
But how do I get the size of the current screen? (Multi-Screen users do not always use the primary screen and not all screens are using the same resolution, right?)
It would be nice to be able to acces the size from XAML, but doing so from code (C#) would suffice.
It works with
Tested on 2 monitors.
Here budy. This will give you only the width and height of the workarea
Why not just use this?
I created a little wrapper around the Screen from System.Windows.Forms, currently everything works... Not sure about the "device independent pixels", though.
This will give you the current screen based on the top left of the window just call this.CurrentScreen() to get info on the current screen.