API Reference
Menu
A menu tree: items that run actions, open submenus, forms, selections and pages. Menu.Run shows it as an app (Shell), a centred menu (Classic) or a scrollback list (Inline), with a breadcrumb, Back/Home/Exit, the command palette (Ctrl+K or :), the key map (?) and a footer generated from the active keys.
Inheritance
- Object
- Menu
Usage
Explore 8 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 6
- Method Menu.Add
- Method Menu.Exit
- Method Menu.Item
- Method Menu.Separator
- Property MenuContext.Menu
- Property MenuItem.SubmenuDefinition
Accepted by parameters 2
- Method MenuItem.Submenu
- Method MenuItem.Submenu
Constructors
public Menu(String title) #Creates a menu.
Parameters
- title System.String
- The title (the app name for the root menu).
Methods
public Menu Exit(String? title = null) #MenuAdds the exit item.
Parameters
- title System.String? = null
- The title; null uses "Exit".
Returns
The menu.
public MenuItem? Find(String title) #MenuItem?Finds an item by title anywhere in the tree.
Parameters
- title System.String
- The title.
Returns
The item, or null.
public Menu Separator(String? title = null) #MenuAdds a divider with an optional heading.
Parameters
- title System.String? = null
- The heading, or null.
Returns
The menu.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public String? Subtitle { get; set; } #Muted text at the right of the title bar (a version, an environment).
public MenuLayout Layout { get; set; } #The layout this menu prefers when MenuOptions.Layout is Auto.
public IList<ICommandProvider> CommandProviders { get; } #Extra sources for the command palette.
public IList<KeyBinding> KeyBindings { get; } #App-wide key bindings (shown in the key map and, by priority, in the footer).