How to retrieve the Screen Resolution of Windows Phone 8 using C# ?

Here’s a simple tip that lets you retrieve the Screen Resolution of Windows Phone 8 using C# .

You can use the Property ScaleFactor defined in the App.Current.Host.Content class to identify the scale factor .

string WindowsPhoneScreenResolution = App.Current.Host.Content.ScaleFactor.ToString();

txtScreenResolution.Text = WindowsPhoneScreenResolution;

This property will return the values 100 , 150 and 160 .

How to retreive the Screen Resolution of Windows Phone 8 using C# ?

How to retreive the Screen Resolution of Windows Phone 8 using C# ?

How to retreive the Screen Resolution of Windows Phone 8 using C# ?

How to retreive the Screen Resolution of Windows Phone 8 using C# ?

The below table illustrates what resolution , the scalefactor maps to.

  • WVGA = 100
  • WXGA = 160
  • 720P = 150

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you’ll learn about the Win32 Error “0x000019E5 – ERROR_COULD_NOT_RESIZE_LOG” that you get when debugging system erors in...
In this post, you’ll learn about the error “CO_E_DBERROR 0x8004E02B” that is returned when working with COM based APIs or...
In this post, you’ll learn about the Win32 Error “0x000019D0 – ERROR_LOG_BLOCK_VERSION” that you get when debugging system erors in...