Udostępnij za pośrednictwem


Creating a New Windows Phone Project

October 21, 2011

Once you have sketched out the pages of your application and defined the navigation flow, you can get started building your application in Visual Studio 2010 Express for Windows Phone.

You Will Learn

  • How to create a new Windows Phone project in Visual Studio.

Applies To

  • Silverlight for Windows Phone OS 7.1

    Gg680268.1ed85806-3f83-4ed2-8bea-454c5977c168(en-us,PandP.11).png

To get started, you can create a new Windows Phone project. Visual Studio includes several project templates. The Windows Phone Application project template is a starting point for all phone project templates, so it is the most common one to use. For more information about these templates, see Using Phone Application Project Templates for Windows Phone.

To create a new Silverlight for Windows Phone project

  1. Make sure you have installed the Windows Phone SDK.

  2. In Visual Studio, create a new project.

  3. In the New Project dialog box, click Silverlight for Windows Phone and then select a project template.

    Gg680268.159a52d2-2d6a-438c-8d20-615ef60dad7c(en-us,PandP.11).png

  4. You will then be invited to choose the version of the Windows Phone Platform that you want to target.

    Gg680268.b0655688-0781-4e8f-929b-291de43da65f(en-us,PandP.11).png

After you create the project, Solution Explorer will be similar to the following illustration.

Gg680268.88d7721d-415f-4592-9e11-f8e30a2540f7(en-us,PandP.11).png

A C# Silverlight for Windows Phone project contains the following files:

Project File

Description

AppManifest.xml

This is the application manifest file that is required to generate the application package. It defines the assemblies that are in the XAP package. You typically do not need to edit this file.

AssemblyInfo.cs

This file contains the name and version metadata that is embedded into the generated assembly.

WMAppManifest.xml

This is the application manifest file that contains phone application metadata. This file is primarily used in the Windows Phone Marketplace submission process. For more information about this file, see Application Manifest File for Windows Phone.

App files

These files are used to specify application-level logic such as defining the entry point for the application and initializing application-scoped resources, The App class is required to display the user interface.

MainPage.xaml

This file is the default start page that is used to create the user interface.

MainPage.xaml.cs

This code-behind file contains the logic for the default start page. The MainPage class derives from PhoneApplicationPage.

ApplicationIcon.png

Background.png

SplashScreenImage.jpg

These are the default icon and image files that you can replace with your own.

Next Topic | Previous Topic | Home