Menu
ConsoleMonster.Interactive
A menu tree: items that run actions, open submenus, forms, selections and pages. 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 61 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 32
- Extension method Menu.CommandProvider
- Extension method Menu.CommandProviders
- Extension method Menu.Description
- Extension method Menu.Item
- Extension method Menu.Items
- Extension method Menu.KeyBinding
- Extension method Menu.KeyBindings
- Extension method Menu.Layout
- Extension method Menu.Preset
- Extension method Menu.Presets
- Extension method Menu.Subtitle
- Extension method Menu.Title
- Method Menu.Add
- Method Menu.Exit
- Method Menu.Item
- Method Menu.Preset
- Method Menu.Separator
- Property MenuContext.Menu
- Method MenuFluent.CommandProvider
- Method MenuFluent.CommandProviders
- Method MenuFluent.Description
- Method MenuFluent.Item
- Method MenuFluent.Items
- Method MenuFluent.KeyBinding
- Method MenuFluent.KeyBindings
- Method MenuFluent.Layout
- Method MenuFluent.Preset
- Method MenuFluent.Presets
- Method MenuFluent.Subtitle
- Method MenuFluent.Title
- Property MenuItem.Submenu
- Method Ui.Menu
Accepted by parameters 29
- Extension method Menu.CommandProvider
- Extension method Menu.CommandProviders
- Extension method Menu.Description
- Extension method Menu.Item
- Extension method Menu.Items
- Extension method Menu.KeyBinding
- Extension method Menu.KeyBindings
- Extension method Menu.Layout
- Extension method Menu.Preset
- Extension method Menu.Presets
- Extension method Menu.Subtitle
- Extension method Menu.Title
- Method MenuFluent.CommandProvider
- Method MenuFluent.CommandProviders
- Method MenuFluent.Description
- Method MenuFluent.Item
- Method MenuFluent.Items
- Method MenuFluent.KeyBinding
- Method MenuFluent.KeyBindings
- Method MenuFluent.Layout
- Method MenuFluent.Preset
- Method MenuFluent.Presets
- Method MenuFluent.Subtitle
- Method MenuFluent.Title
- Extension method MenuItem.Submenu
- Extension method MenuItem.Submenu
- Method MenuItemFluent.Submenu
- Method MenuItemFluent.Submenu
- Method Ui.Menu
Constructors
public Menu(string title) #Creates a menu.
Parameters
- title string
- The title (the app name for the root menu).
Methods
public Menu Exit(string? title = null) #Adds the exit item.
Parameters
- title string? = null
- The title; null uses "Exit".
public MenuItem? Find(string title) #Finds an item by title anywhere in the tree.
Parameters
- title string
- The title.
public Menu Separator(string? title = null) #Adds a divider with an optional heading.
Parameters
- title string? = null
- The heading, or null.
Inherited Methods
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).
public IList<MenuPreset> Presets { get; } #The presets the app comes with (declared on the root menu): a MenuItem.Presets item lists them before the presets people save, marked as built in; they cannot be overwritten or deleted. A saved preset whose name matches a built-in one (ignoring case) is hidden.