Jul 31 2017

Multi-resolution apps for Windows Phone 8 #aspect #phone #system


Multi-resolution apps for Windows Phone 8

This app has a dynamic layout on WVGA, WXGA, 720p, and 1080p. The output box is the same size on WVGA and WXGA phones because the Height property is set to Auto. and the buttons shrink evenly to fit the rest of the available space. At 720p and 1080p resolutions, the buttons will be slightly higher than at WVGA and WXGA resolutions.

You can set the MinHeight and MaxHeight properties to set minimum height and maximum height. It’s important to remember that any element on the screen under 8mm in any direction becomes hard for the user to press reliably. You can use the MinHeight properties and MinWidth to make sure that interactive elements don’t shrink more than expected. You can combine these properties to allow a layout to shrink for WVGA resolution, but not to stretch for higher resolutions.

Assets such as graphics, video, audio, and icons make up a large percentage of an app’s size. Including assets for all resolutions in your app uses a lot of space in your app. For most apps, we recommend that you include only WXGA assets. WXGA assets have the highest quality, and they automatically scale to work well for other resolutions.

Because of the aspect ratio difference between WXGA/WVGA and 720p/1080p resolutions, in some cases you might want to include unique background images for different resolutions in your app. When you want to include images for all supported resolutions in your app, use the following steps to detect device resolution, and then load the relevant image at run time.

To load resolution-dependent images at runtime

In your project file, add the images for WVGA, WXGA and 720p resolutions. In this example, we name the files MyImage.screen-wvga.png, MyImage.screen-wxga.png, and MyImage.screen-720p.png.

Set the Copy to Output Directory property of the images to copy always .

Add a class named ResolutionHelper.cs to your project, and then copy and paste the following code into the new class.

Written by admin

Leave a Reply

Your email address will not be published. Required fields are marked *