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’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...