# Quick Start

## Content

This quick start creates a navigation menu with a parent item and child items.

## Install the NuGet Package

[C1HamburgerMenu](/componentone/api/win/online-hamburger-menu/dotnet-api/C1.Win.Command.HamburgerMenu.10/C1.Win.Command.HamburgerMenu.C1HamburgerMenu.html) is included in the ![](https://cdn.mescius.io/document-site-files/images/cba1bceb-04d5-4184-987c-6bf624f0bae2/NuGet_project_logo.svg-20261030.60a6e2.webp?width=15&verticalAlign=middle) [C1.Win.Command](https://www.nuget.org/packages/C1.Win.Command#readme-body-tab) NuGet package. Install the package by using one of the following methods:
**Visual Studio:** In **Solution Explorer**, right-click the project, and then select **Manage NuGet Packages**. On the **Browse** tab, search for `C1.Win.Command.HamburgerMenu`, and then select **Install**.
**.NET CLI:**

```auto
dotnet add package C1.Win.Command.HamburgerMenu
```

**Package Manager Console:**

```auto
Install-Package C1.Win.Command.HamburgerMenu
```

***

## 1\. Set Up the Application

1. Create a Windows Forms application.
2. Add a `C1HamburgerMenu` control to the form. By default, the control is named `c1HamburgerMenu1`.
3. Set the `Dock` property. For example, use `DockStyle.Left`.
4. 

***

## 2\. Add Menu Items and Handle Selection

Add menu items and configure item selection as follows:

1. Add `C1HamburgerMenuItem` objects to the menu’s [Items](/componentone/api/win/online-hamburger-menu/dotnet-api/C1.Win.Command.HamburgerMenu.10/C1.Win.Command.HamburgerMenu.C1HamburgerMenu.Items.html) collection.
2. Add child items to the parent item’s `Items` collection.
3. Handle the [ItemSelected](/componentone/api/win/online-hamburger-menu/dotnet-api/C1.Win.Command.HamburgerMenu.10/C1.Win.Command.HamburgerMenu.C1HamburgerMenu.ItemSelected.html) event to display content associated with the selected item.

Add the following code to the form code-behind file, such as `Form1.cs`, after the `InitializeComponent()` call in the form constructor.
The following example adds a **Mail** item with **Inbox** and **Drafts** child items, and displays the text of the selected item in a message box:

```csharp
using C1.Win.Command.HamburgerMenu;
using System.Windows.Forms;

namespace MyApp
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent(); 

            var mail = new C1HamburgerMenuItem {Text = "Mail", ToolTipText = "Email content."};
            mail.Items.Add(new C1HamburgerMenuItem {Text = "Inbox", ToolTipText = "Incoming emails." });
            mail.Items.Add(new C1HamburgerMenuItem {Text = "Drafts", ToolTipText = "Drafts."});

            c1HamburgerMenu1.Items.Add(mail);
            c1HamburgerMenu1.ExpandedWidth = 215;
            c1HamburgerMenu1.AllowWrapToNextLine = true;
            c1HamburgerMenu1.IsExpanded = true;
        }
    }
}
```

`ExpandedWidth` sets the width of the expanded menu. If you use push-content layouts, also set `AllowWrapToNextLine` to `true`.

***

## 3\. Run the Application

Run the application. The menu starts expanded because the code sets `IsExpanded` to `true`. Select an item, such as **Mail**, **Inbox**, or **Drafts**, and the message box displays its text.
![C1WinForms Hamburger Menu - Quick start result](https://cdn.mescius.io/document-site-files/images/cba1bceb-04d5-4184-987c-6bf624f0bae2/image-20261016.754ab6.png?width=150&verticalAlign=middle)