+ Reply to Thread
Results 1 to 2 of 2

Thread: Get current screen resolution in WPF?

  1. #1

    Get current screen resolution in WPF?

    I just started learning WPF , i wanted to find out the screen resolution , how can i do that in WPF ?
    Last edited by csharpmaster; 10-31-2012 at 04:24 AM.

  2. #2
    Here is the code snippet to get the screen width and height.

                double deskHeight = System.Windows.SystemParameters.PrimaryScreenHeight;
                double deskWidth = System.Windows.SystemParameters.PrimaryScreenWidth;
                this.Height = deskHeight;
                this.Width = deskWidth;

+ Reply to Thread

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts