Chapter 4. Creating a New Project

Now that you have the Windows Phone Developer Tools installed you can create a new project in Visual Studio 2010 Express for Windows Phone, add a control to the application's main page, and build the project.

Before you create your first project, it is important to note that window layouts and menu commands shown in this book are based on Visual Studio 2010 Express for Windows Phone, and may differ slightly from the commands and layouts found in the Windows Phone add-in for Visual Studio 2010 Professional or Visual Studio 2010 Ultimate editions.

WHICH PROJECT TEMPLATE TO CHOOSE?

Visual Studio 2010 Express for Windows Phone comes with five preinstalled project templates:

  • Windows Phone Application

  • Windows Phone Databound Application

  • Windows Phone Class Library

  • Windows Phone Panorama Application

  • Windows Phone Pivot Application

Windows Phone Application

This is the project template type that you will in most cases use to create a new project. If you select this project type Visual Studio will generate a default project with the most basic structure. It will create a MainPage.xaml file that contains a Title StackPanel at the top with two TextBlocks, one for the application name and one for the page name. Below the StackPanel is a grid named Content Panel where you will place the controls needed for your application's start-up page. See Figure 4-1.

FIGURE 4-1

Figure 4-1. FIGURE ...

Get Windows® Phone 7 Application Development 24-Hour Trainer now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.