Condividi tramite


Create a new document

To create a new document in a WPF project

  1. On the File menu, click New Item, and then do one of the following:

    • Click Window to add a top-level window or dialog box to your WPF project.

    • Click UserControl to define an interface component that you can embed within other parts of your WPF project.

    • Click Page to contain a section of your project that can be reached by navigation either in a browser-hosted application or a navigation window in a WPF project.

    • Click Resource Dictionary to store and share resources among various parts of your project.

    • Click UserControl with ViewModel to create a UserControlView and a ViewModel associated with that View for data-bound applications.

    • Click Class to create an empty class declaration.

    • Click Action to create an empty action that can be paired with a trigger to create interactivity.

    • Click Behavior to create an empty behavior that you can use to encapsulate an interaction that can be applied to objects in your application.

    • Click Trigger to create an empty trigger that you can use to specify the conditions that will invoke an action.

  2. In the Name box, type a name for the document if you would like to rename the file.

To create a new document in a Silverlight project

  1. On the File menu, click New Item, and then do one of the following:

    • Click UserControl to define portions of a user interface that you can embed within other parts of your Silverlight application.

    • Click Resource Dictionary to store and share resources among various parts of your project.

    • Click ChildWindow to display a pop-up window in a Silverlight application.

    • Click Page to contain a section of your Silverlight application that can be reached by navigation within a Frame.

    • Click UserControl with ViewModel to create a UserControlView and a ViewModel associated with that View for data-bound applications.

    • Click Class to create an empty class declaration.

    • Click Action to create an empty action that can be paired with a trigger to create interactivity.

    • Click Behavior to create an empty behavior that you can use to encapsulate an interaction that can be applied to objects in your application.

    • Click Trigger to create an empty trigger that you can use to specify the conditions that will invoke an action.

  2. In the Name box, type a name for the document if you would like to rename the file.