An example application demonstrating how to create a dynamic layouts for
different size of resolutions and physical screens on Windows Phone 8 platform.
The application presents a number of items on the main page. Layout and size of
the items depends on a style applied to the items, the style depending on the
resolution of the device. A default style is always loaded and as it’s name
suggests, it defines a universal style suitable for presenting items in all
supported resolutions. In devices with 1080p resolution an additional style is
loaded at runtime. This 1080p style overrides some details of the default style,
optimizing the layout for a large display with 1080p resolution.
Developed with Microsoft Visual Studio Express for Windows Phone 2012.
Compatible with:
Windows Phone 8
Tested to work on:
Nokia Lumia 925
Nokia Lumia 1520
Instructions
Make sure you have the following installed:
Windows 8
Windows Phone SDK 8.0
NuGet Package Manager (https://nuget.org/), Visual Studio extension to install and update third-party libraries and tools in Visual Studio
To build and run the sample:
Open the SLN file
File > Open Project, select the file DynamicLayoutSample.sln
Install Windows Phone Toolkit for the project.
Right click References in Solution Explorer -> select Manage NuGet Packages
Search for ‘wptoolkit’ and install the ‘Windows Phone toolkit’ package
Select the target ‘Emulator WVGA’ / ‘Emulator 720P’. As there is no dedicated 1080P emulator available, the application uses ‘Emulator 720P’ to emulate 1080P resolution as they share the same aspect ratio.
Press F5 to build the project and run it on the Windows Phone Emulator.
Dynamic Layout Sample
An example application demonstrating how to create a dynamic layouts for different size of resolutions and physical screens on Windows Phone 8 platform.
The application presents a number of items on the main page. Layout and size of the items depends on a style applied to the items, the style depending on the resolution of the device. A default style is always loaded and as it’s name suggests, it defines a universal style suitable for presenting items in all supported resolutions. In devices with 1080p resolution an additional style is loaded at runtime. This 1080p style overrides some details of the default style, optimizing the layout for a large display with 1080p resolution.
This example application is hosted in GitHub: https://github.com/Microsoft/dynamic-layout-sample
Additional documentation available at Lumia Developer’s Library: http://developer.nokia.com/Resources/Library/Lumia/#!code-examples/dynamic-layout-sample.html
Developed with Microsoft Visual Studio Express for Windows Phone 2012.
Compatible with:
Tested to work on:
Instructions
Make sure you have the following installed:
To build and run the sample:
To deploy the sample on Windows Phone 8 device:
About the implementation
Important folders:
Important files:
Important classes:
Additional information on adapting to 1080p resolution and large displays can be found from Nokia Lumia Developer’s Library: http://developer.nokia.com/Resources/Library/Lumia/
Known issues
No known issues.
License
See the license file delivered with this project.
Version history