David Bekham
David Bekham

Reputation: 2175

How to get device resolution in Windows Phone 8?

Is there any way in Windows Phone 8 to get the Device's resolution ?. Basically i need to set the device resolution to my Preview and Capture sequence ?. Any one help me on this ?

Upvotes: 3

Views: 4636

Answers (2)

cmusicfan2000
cmusicfan2000

Reputation: 45

When you say "device resolution" do you mean the resolution of the camera or the screen resolution of the phone? If you want the screen resolution, then you can always use the xaml page's "height" and "width" properties to get it. Hope this helps!

Upvotes: 0

Paul Annetts
Paul Annetts

Reputation: 9604

See MSDN article on multi-resolution on Windows Phone 8. Basically you'll have to get the base resolution used in XAML and apply the scale factor that the phone is using.

For example:

WVGA 480 × 800 = 1x(480 × 800)

WXGA 768 × 1280 = 1.6x(480 × 800)

720p 720 × 1280 = 1.5x(480 × 853)

Upvotes: 4

Related Questions