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

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

You May Also Like

This blog post will guide you through several effective methods to troubleshoot and resolve the issue of Microsoft Edge not...
Windows 11 offers a range of audio enhancements that can enrich your listening experience. These enhancements include features like virtual...
Windows 11 brings a fresh and visually stunning design to your desktop, and one of the standout features is the...