Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WP8 Emulator screen size

I have migrate my WP7 application to WP8 platform. Now, if I start debugging my application in WXGA Emulator (screen size should be 768 × 1280). I have got Host.Content.ActualWidth=480 and Host.Content.ActualHeight=800.

Is it normal behaviour? Why WXGA emulator have screen size 480x800?

like image 314
xVir Avatar asked Dec 03 '22 01:12

xVir


1 Answers

Yeah, that's how WP8 should work.

The zen of WP8 multi-resolution is to make developers to do as little work as possible to account for different resolutions. Other platforms dump all the hard work on developers to use physical pixels for different resolutions. Instead WP8 uses logical pixels of 480x800 and 480x853 to account for different resolutions.

App developers really need to only do two things. First is to use Grid relative design (and not Canvas absolute design) to help with the 480x853 logical resolution. Second is to make sure to use media assets that work well for different resolutions. For example, you don't want to play a 720p video on a low-res screens, and you don't want to stretch a 240 pixels wide image on an HD resolution screen.

I wrote about this topic extensively including code samples and how the relevant APIs behave @ http://www.developer.nokia.com/Community/Wiki/What%27s_new_in_Windows_Phone_8#Multi_resolution

WP8 Multi-res APIs

like image 112
JustinAngel Avatar answered Dec 24 '22 10:12

JustinAngel