How to determine screen resolution on Windows Phone 8

This is a very common scenario most developers stumble across - they are building an app for Windows Phone and have to target all 3 screen resolutions available with Windows Phone 8.

The 3 screen resolutions for your reference are:

WVGA - 480x800 or 800x480 (15:9 ratio)
WXGA - 768x1280 or 1280x768 (15:9 ratio)
720p - 720x1280 or 1280x720 (16:9 ratio)

There may be many scenarios in which you would want to know the screen resolution of the device your app is running on, a popular one being that you want to show higher quality images for higher resolution devices. You can accomplish this very easily by checking for the ScaleFactor as follows:

  if(App.Current.Host.Content.ScaleFactor == 100)
    // WVGA
  else if (App.Current.Host.Content.ScaleFactor == 160)
    // WXGA
  else if (App.Current.Host.Content.ScaleFactor == 150)
     // 720p

More at

Paras Wadehra
Twitter: @ParasWadehra
FB Group:

Comments (1)

  1. ando says:

    Hi Paras,

    It is not clear how one can use high quality images as all images are resized.

    So even using images 720p on device with 720p resolution – image will be stretched outside the screen.

    Can you explain how to use the exact resolution of device without automatic resizing.


Skip to main content