Table of Contents

Constructor MenuItem

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

MenuItem(Key)

Initializes a new instance of MenuItem

public MenuItem(Key shortcut = Key.Null)

Parameters

shortcut Key

MenuItem(ustring, ustring, Action, Func<bool>, MenuItem, Key)

Initializes a new instance of MenuItem.

public MenuItem(ustring title, ustring help, Action action, Func<bool> canExecute = null, MenuItem parent = null, Key shortcut = Key.Null)

Parameters

title ustring

Title for the menu item.

help ustring

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.

shortcut Key

The Shortcut keystroke combination.