Partager via


Create a new project

You can create a project to design a desktop application that is based on Windows Presentation Foundation (WPF), or a web application that is based on Microsoft Silverlight. Regardless of the technology that you choose, the visual design experience is the same.

To create a new WPF project

  1. On the File menu, click New Project.

    JJ171049.f60e8b59-50de-4da1-9ba8-722dc5394d9d(fr-fr,VS.110).png

    In the New Project dialog box, under Project types, click WPF.

    Créer un projet pour WPF

  2. Select one of the following types of projects:

    • WPF Application   A project for creating a desktop application that runs on Windows.

    • WPF Control Library   A project for creating custom controls that can be reused in other WPF projects.

    • WPF Databound Application   A project that uses data and command bindings to support loose coupling between a View and a ViewModel.

    • WPF SketchFlow Application   A project for prototyping a desktop application that runs on Windows. SketchFlow is available only in Expression Studio Ultimate.

  3. In the Name box, type a name for the project.

  4. In the Location box, type the name of or browse to the folder where you want to store the project. By default, this is a folder named "Blend Projects" in your "My Documents" folder.

  5. On the Language menu, select a programming language (Visual C# or Visual Basic).

    [!REMARQUE]

    In general, you can bypass selecting a programming language and just use the default, which is C#. (Using C# creates .cs files.) However, there may be times when the developer who is working on your application may want to indicate a specific programming language (for example, Microsoft Visual Basic, which creates .vb files) for ease of use, for familiarity, to integrate the project files more easily with legacy code, or for another reason.

  6. Click OK.

    Blend for Visual Studio 2012 creates a new project and opens it for editing. You can now begin creating content in the main page (MainWindow.xaml) of your project.

    For a list of the files that are generated by Blend and a description for each file, see the section "The files in a WPF project," in Managing solutions, projects, and files in Blend.

To create a new Silverlight project

  1. On the File menu, click New Project (CTRL+SHIFT+N).

  2. In the New Project dialog box, under Project types, click Silverlight.

    Créer un projet pour Silverlight

  3. From the list on the right side of the dialog box, select one of the following types of projects:

    • Silverlight Application + Website   A project with an associated website that you can publish to a web server.

    • Silverlight Application   A project that creates an application that can be run in the Silverlight runtime viewer, inside or outside a browser window. The project includes an HTML test page named Default.html that will load your application in a browser window.

      ConseilConseil

      The HTML test page is overwritten every time that you build or test your project. If you want to modify the test page for your own use, save it to a different location first.

    • Silverlight Databound Application   A project that uses data and command bindings to support loose coupling between a View and a ViewModel.

    • Silverlight Control Library   A project for creating custom controls that can be reused in other Silverlight projects.

    • Silverlight SketchFlow Application   A project for prototyping cross-platform, web-based applications. SketchFlow is available only in Expression Studio Ultimate.

  4. Next to Name, type a name for your project. This will become the name of the project folder and the name of your application's namespace.

    ConseilConseil

    Namespace is a Microsoft .NET Framework term for the name that identifies your application to other applications. For more information, see Understanding and Using Assemblies and Namespaces in .NET on MSDN.

  5. Next to Location, verify the path of the folder in which you want to save your project. To select a different folder, click Browse.

  6. In the Language drop-down list, select the programming language for your code-behind files (Visual Basic or Visual C#).

  7. Click OK.

    A Silverlight project is created and opened for editing. You can now begin creating content in the main page (MainPage.xaml) of your project.

    For a list of the files that are generated by Blend and a description for each file, see the section "The files in a Silverlight project," in Managing solutions, projects, and files in Blend.

To create a Windows Phone project

A Windows Phone project in Blend functions just like other Blend projects. However, Windows Phone projects also include tools specifically for designing Windows Phone applications.

Important

Blend for Windows Phone is available only when you install the Windows Phone Developer Tools.

  1. On the File menu, click New Project.

  2. In the New Project dialog box, under Project types, click Windows Phone.

  3. From the list on the right side of the dialog box, select one of the following types of projects:

    • Windows Phone application   A project for creating a Silverlight for Windows Phone application.

    • Windows Phone Databound application   A Silverlight for Windows Phone project that uses data and command bindings to support loose coupling between a View and a ViewModel.

    • Windows Phone Panorama application   A Silverlight for Windows Phone project that uses the Panorama control to create a panorama-style application.

      For more information on the Panorama control, see Panorama application for Windows Phone on MSDN.

    • Windows Phone Pivot application   A Silverlight for Windows Phone project that uses the Pivot control to create a tabbed-style application.

      For more information on the Pivot control, see the Pivot application for Windows Phone on MSDN.

    • Windows Phone Control Library   A project for creating custom controls that can be reused across other Windows Phone applications.

  4. In the Name box, type a name for the project.

  5. In the Location box, browse to the folder where you want to store the project.

  6. In the Language box, select either Visual C# or Visual Basic.

  7. In the Version box, select either 7.1 or 8.0.

  8. Click OK.

You can now create your Windows Phone application.

For more information, see Expression Blend for Windows Phone overview.

For a list of the files that are generated by Blend and a description for each file, see the section "The files in a Windows Phone project," in Managing solutions, projects, and files in Blend.

JJ171049.collapse_all(fr-fr,VS.110).gifNext steps

You can design the user interface of your application by adding objects to the main document. For more information, see Drawing objects.