> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# NTMenuItem

## Definition

**NTMenuItem** is used to create new menu entries. For example, an instance of this class can be placed in an existing Control Center menu to launch an [**NTWindow**](/developer/desktop-sdk/references/add-on/ntwindow) as part of an AddOn, as seen in the example code below.

For a complete, working example of this class in use, download the framework example located on our [Developing AddOns Overview](/developer/desktop-sdk/guides/educational-resources/addon-development-overview/developing-add-ons).

## Examples

```csharp
private NTMenuItem myNewMenuItem;
private NTMenuItem existingControlCenterNewMenu;

protected override void OnWindowCreated(Window window)
{
    // We want to place the menu item for the AddOn in the Control Center's "New" menu
    // First obtain a reference to the Control Center window
    ControlCenter cc = window as ControlCenter;
    if (cc == null)
        return;

    /* Determine we want to place the AddOn in the Control Center's "New" menu
    Other menus can be accessed via the control's "Automation ID". For example: toolsMenuItem, workspacesMenuItem, connectionsMenuItem, helpMenuItem. */
    existingControlCenterNewMenu = cc.FindFirst("ControlCenterMenuItemNew") as NTMenuItem;
    if (existingControlCenterNewMenu == null)
        return;

    // Instantiate myNewMenuItem
    // 'Header' sets the name of our AddOn seen in the menu structure. 'Style' sets the font style.
    myNewMenuItem = new NTMenuItem { Header = "AddOn Framework", Style = Application.Current.TryFindResource("MainMenuItem") as Style };

    // Add our AddOn menu item into the "New" menu
    existingControlCenterNewMenu.Items.Add(myNewMenuItem);

    // Subscribe to the event for when the user presses the menu item
    myNewMenuItem.Click += OnMenuItemClick;
}
```