Templates to speed up your app development

70 out of 117 rated this helpful - Rate this topic

Templates provide a starting point to help you create Windows Store apps. Microsoft Visual Studio 2012 editions, including Microsoft Visual Studio Express 2012 for Windows 8 and Blend for Microsoft Visual Studio 2012 for Windows 8, come with a variety of project templates and item templates to help you develop your app faster. The topics in this section describe these project templates and item templates.

Note  Windows Store app development in Visual Studio is supported only on Windows 8. Windows 7 is not supported. In addition, developer licenses aren't available for Windows Server 2012, so you can't develop Windows Store apps on that operating system.

The choice of which template to start with depends on what sort of app or game you want to create. See Planning Windows Store apps for guidance on planning your app.

Project templates

When you create a new Windows Store app in Visual Studio, start by selecting a programming language and then a project template.

Hh738343.wedge(en-us,WIN.10).gifTo select a project template

  1. Click File > New Project.
  2. In the left pane of the New Project dialog box, under Templates, look under JavaScript, Visual Basic, Visual C#, or Visual C++, depending on which programming language you prefer.
  3. Click Windows Store.

In the middle pane, you now see the project templates. The following illustration shows the list of project templates for Visual C#:

New Project dialog box in Visual Studio

There are three project templates available for all four programming languages:

  • Blank App. A project with nothing in it.
  • Grid App. A project that displays groups of data in a grid format. This template provides an excellent starting point for creating an app that enables users to browse through categories to find content in which they want to fully immerse themselves. Examples include shopping apps, news apps, RSS readers, and photo or video apps.
  • Split App. A project that displays a master/detail list. Examples include news readers, sports scores apps, and e-mail apps.

For more detailed descriptions of the default project templates, see JavaScript project templates for Windows Store apps and C#/VB/C++ project templates for Windows Store apps.

If the Split App and Grid App templates aren't appropriate for your app, you probably want to start with the Blank App template. You might think a blank template isn't much of a start, but, after you create a blank project, you can add a variety of item templates that you can use as starting points for pages in your app.

Item templates

After you create your project, you can add item templates to it. You add these by clicking Project > Add New Item or by right-clicking the project in Solution Explorer and then clicking Add > New Item.

In Visual Studio, you should see something like this:

Add New Item dialog box

In Visual C#, Visual Basic, and Visual C++, the Grid App and Split App project templates are actually made up of item templates, and most item templates correspond to pages within your app. For example, if you want a basic app page with a title and recommended margins and styles, you could start with a Blank App project template and add a Basic Page item template. That Basic Page template could be the starting page for your app, and you could add more item templates to create other pages in your app.

For more detailed descriptions of the default item templates, see JavaScript item templates for Windows Store apps and C#/VB/C++ item templates for Windows Store apps.

We recommend that you spend a few minutes exploring the item templates in the Add New Item dialog box. Aside from app pages like Basic Page and file types like XML File, there are several contracts available to get you started with extending the capabilities of your app, including sharing data and search results, and opening files.

What's next?

If you've picked your programming language and know what kind of app you want to create, your next step is to start creating your first app. Here's more info about what to do next:

JavaScript and HTML Visual C# or Visual Basic and XAMLVisual C++ and XAMLVisual C++ and DirectX
Create your first Windows Store app using JavaScript Create your first Windows Store app using C# or Visual Basic Create your first Windows Store app using C++ Create your first Windows Store app using DirectX

 

 

 

Build date: 3/11/2013

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.