# Quick Start

## Content



The following quick start guide is intended to get you up and running with the Menu control. In this quick start, you start with creating a new application, adding the Menu control to it and then adding the MenuItems to the Menu control.

| ![Menu with menu items](https://cdn.mescius.io/document-site-files/images/2d49eac2-0942-4770-99ef-52b14e6815bd/images/menu-quickstart.gif) |
| --- |

## Create a WinUI Application and add References

1.  In Visual Studio, create a new WinUI App. For detailed steps, see [Configure WinUI Application](/componentone/docs/winui/online-winui/configuring-winui-app).
2.  In the **Solution Explorer**, right click **Dependencies** and select **Manage NuGet Packages**.
3.  In **NuGet Package Manager**, select **nuget.org** as the **Package source**.
4.  Search and select the following package and click **Install**.
    *   **C1.WinUI.Menu**

## Configure the Menu control

1.  Declare the namespace using the following code in XAML:<br />
    
    ```xml
    xmlns:c1 ="using:C1.WinUI.Menu"
    ```
    
2.  Place the cursor between the \<Grid>\</Grid> tag and add the following code to create a menu using the [C1Menu](/componentone/api/winui/online-winui/dotnet-api/C1.WinUI.Menu/C1.WinUI.Menu.C1Menu.html) class, set its orientation and alignment.<br />
    
    ```xml
    <c1:C1Menu x:Name="WordMenu" Orientation="Horizontal" VerticalAlignment="Top"></c1:C1Menu>
    ```
    
3.  Add items to the menu using [C1MenuItem](/componentone/api/winui/online-winui/dotnet-api/C1.WinUI.Menu/C1.WinUI.Menu.C1MenuItem.html) class using the following code.
    
    ```xml
    <c1:C1MenuItem Header="File">
        <c1:C1MenuItem Header="New">
            <c1:C1MenuItem Header="Document"/>
            <c1:C1MenuItem Header="Project"/>
        </c1:C1MenuItem>
        <c1:C1MenuItem Header="Open">
            <c1:C1MenuItem Header="Document"/>
            <c1:C1MenuItem Header="Project"/>
            <c1:C1MenuItem Header="Recent Document 1">
            </c1:C1MenuItem>
            <c1:C1MenuItem Header="Recent Document 2">
            </c1:C1MenuItem>
        </c1:C1MenuItem>
        <c1:C1MenuItem Header="Close Solution"/>
        <c1:C1MenuItem Header="Save"/>
        <c1:C1MenuItem Header="Exit"/>
    </c1:C1MenuItem>
    <c1:C1MenuItem Header="Edit">
        <c1:C1MenuItem Header="Undo"/>
        <c1:C1MenuItem Header="Redo"/>
    </c1:C1MenuItem>
    <c1:C1MenuItem Header="Build"/>
    ```
    

## Build and Run the Project

1.  Click **Build | Build Solution** to build the project.
2.  Press **F5** to run the project.