Table of Contents

Constructor MenuItem

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

MenuItem(Key?)

Initializes a new instance of MenuItem

public MenuItem(Key? shortcutKey = null)

Parameters

shortcutKey Key

MenuItem(string?, string?, Action?, Func<bool>?, MenuItem?, Key?)

Initializes a new instance of MenuItem.

public MenuItem(string? title, string? help, Action? action, Func<bool>? canExecute = null, MenuItem? parent = null, Key? shortcutKey = null)

Parameters

title string

Title for the menu item.

help string

Help text to display.

action Action

Action to invoke when the menu item is activated.

canExecute Func<bool>

Function to determine if the action can currently be executed.

parent MenuItem

The Parent of this menu item.

shortcutKey Key

The ShortcutKey keystroke combination.