Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
505 views
in Technique[技术] by (71.8m points)

emulation - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...