How to get the Scaled Resolution of Windows Phone 8 using C# ?

In one of my previous blog post , I wrote about How to retrieve the Screen Resolution of Windows Phone 8
using C# ? .

In this blog post , I will be sharing information on how one can retrieve the Scaled Resolution of Windows Phone 8 using C# .

The Windows Phone 8 supports 3 different resolutions

  • 480 X 800 with aspect ratio of 15:9 and scaled resolution of 480 X 800
  • 768 X 1280 with aspect ratio of 15:9 and scaled resolution of 480 X 800
  • 720 X 1280 with aspect ratio of 16:9 and scaled resolution of 480 X 853

How to get the Scaled Resolution of Windows Phone 8 using C# ?

The Application.Current.Host.Content.ActualWidth and Application.Current.Host.Content.ActualHeight property can be used to retreive the necessary information w.r.t the height and width of the screen.

Below is a sample sourecode that demonstrates how to retrieve the Scaled Resolution of Windows Phone 8 using C# .

string WindowsPhoneScreenResolution = Application.Current.Host.Content.ActualWidth.ToString() + " X " + Application.Current.Host.Content.ActualHeight.ToString();

txtScreenResolution.Text = WindowsPhoneScreenResolution;

When the Windows Phone 8 project is executed , you will see the data 480 X 800 and 480 X 853 depending on the screen resolution of the device.

How to get the Scaled Resolution of Windows Phone 8 using C# ?


How to get the Scaled Resolution of Windows Phone 8 using C# ?

How to get the Scaled Resolution of Windows Phone 8 using C# ?


How to get the Scaled Resolution of Windows Phone 8 using C# ?

Leave a Reply