Application Templates in Visual Studio 2012

For earlier XAML platforms, the projects in Visual Studio to create a XAML applications are very simple. A Window or UserControl is created, along with a XAML file for the Application object, named App.xaml in Silverlight and Application.xaml in WPF.

The standard templates for WPF and Silverlight applications place nothing in the Window or UserControl except a root layout Grid. No starting resources of any kind are included. It is up to the developer to supply styling, brushes, and so forth.

If Silverlight has RIA Services installed, an alternate template is available for a Navigation Application. This template places quite a bit more items into the project, and has some minimal navigation functionality right away.

The application templates for Windows 8 start with same approach as the Navigation Application and then take it further. All three templates, including the Blank App template, include a library of styles in a XAML file called StandardStyles.xaml. It is placed in a folder named Common.

The other templates, Grid App and Split App, also include multiple pages, with controls already on them. Sample data is included, and navigation logic is built in to allow selection of data items to navigate to new pages.

Using the Grid App or Split App template, you immediately have an application that satisfies basic Windows 8 conventions. However, this also makes for a rather complex starting point for your application. You'll need to study ...

Get Professional Visual Basic 2012 and .NET 4.5 Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.