on-internet
← Community

How to get the size of the current screen in WPF?

Stack Overflow ·

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.

Comments

Sign in or sign up to comment and upvote.

No comments yet.