Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scorta/6567256 to your computer and use it in GitHub Desktop.
Save scorta/6567256 to your computer and use it in GitHub Desktop.
How to determine screen resolution on 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)
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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment