Constructor MenuItem | Terminal.Gui v2 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
Initializes a new instance of MenuItem
public MenuItem(Key? shortcutKey = null)
Parameters
shortcutKey
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.
Function to determine if the action can currently be executed.
parent
MenuItem
The Parent of this menu item.
shortcutKey
Key
The ShortcutKey keystroke combination.