Bagikan melalui


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.

    Cc295275.f60e8b59-50de-4da1-9ba8-722dc5394d9d(en-us,Expression.40).png

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

    Cc295275.23a81768-ebce-47b4-a70d-c58fd347f8fb(en-us,Expression.40).png

  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).

    Note

    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.

    Microsoft Expression Blend 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 Expression Blend and a description for each file, see the section "The files in a WPF project," in Managing solutions, projects, and files.

To create a new Silverlight project

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

    Cc295275.f60e8b59-50de-4da1-9ba8-722dc5394d9d(en-us,Expression.40).png

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

    Cc295275.c1f53de8-8edc-4ace-87f0-de702852cb7a(en-us,Expression.40).png

  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.

      Tip

      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.

    Tip

    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 Cc295275.xtlink_newWindow(en-us,Expression.40).png 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 Expression Blend and a description for each file, see the section "The files in a Silverlight project," in Managing solutions, projects, and files.

To create a Windows Phone project

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

Important

Expression Blend for Windows Phone is available only when you install the Windows Phone Developer Tools Cc295275.xtlink_newWindow(en-us,Expression.40).png.

  1. On the File menu, click New Project.

    Cc295275.f60e8b59-50de-4da1-9ba8-722dc5394d9d(en-us,Expression.40).png

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

    Create new Windows Phone project dialog

  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 Cc295275.xtlink_newWindow(en-us,Expression.40).png 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 Cc295275.xtlink_newWindow(en-us,Expression.40).png 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.0 or 7.1.

  8. Click OK.

You can now create your Windows Phone application.

For more information, see Create content for Windows Phone.

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

Next steps

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

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.