1
\$\begingroup\$

I want to detect if a device uses WVGA, WXGA, 720p or 1080p resolution. In addition, I want to store the resolution of the device in a variable. For example, if the resolution is 800x480 pixel, then the variable has the value: string CurrentResolution = "720p".

How can I do that? How can I detect the screen resolution of a Windows Phone device?

\$\endgroup\$

closed as off-topic by Josh Jan 12 '15 at 18:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Programming questions that aren't specific to game development are off-topic here, but can be asked on Stack Overflow. A good rule of thumb is to ask yourself "would a professional game developer give me a better/different/more specific answer to this question than other programmers?"" – Josh
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    \$\begingroup\$ Pretty sure you can just use 'GraphicsDevice.PresentationParameters.BackBufferWidth' and 'GraphicsDevice.PresentationParameters.BackBufferHeight'. \$\endgroup\$ – ClassicThunder May 9 '14 at 22:28
  • \$\begingroup\$ It's not working with the 1080p emulator. It detects 1279x720 pixel if I choose the 1080p emulator. But I need to know if the emulator/device has a 720p or a 1080p resolution. How can I detect 1080p resolution? \$\endgroup\$ – Homer_Simpson May 10 '14 at 8:11