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

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

You May Also Like

In this post, you will learn about sync provider notifications in Windows 11 and how to disable or enable it...
In this tutorial, let’s learn how to enable or disable the startup sound in Windows 11. By default, when Windows...
The CameraCaptureTask allows the Windows Phone 7 App to launch the Camera Application . This will be useful when the...