Table of Contents

Constructor MenuBarItemv2

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

MenuBarItemv2()

Creates a new instance of MenuBarItemv2.

public MenuBarItemv2()

MenuBarItemv2(View?, Command, string?, PopoverMenu?)

Creates a new instance of MenuBarItemv2. Each MenuBarItem typically has a PopoverMenu that is shown when the item is selected.

public MenuBarItemv2(View? targetView, Command command, string? commandText, PopoverMenu? popoverMenu = null)

Parameters

targetView View

The View that command will be invoked on when user does something that causes the MenuBarItems's Accept event to be raised.

command Command

The Command to invoke on targetView. The Key targetView has bound to command will be used as Key

commandText string

The text to display for the command.

popoverMenu PopoverMenu

The Popover Menu that will be displayed when this item is selected.

MenuBarItemv2(string, PopoverMenu?)

Creates a new instance of MenuBarItemv2 with the specified popoverMenu. This is a helper for the most common MenuBar use-cases.

public MenuBarItemv2(string commandText, PopoverMenu? popoverMenu = null)

Parameters

commandText string

The text to display for the command.

popoverMenu PopoverMenu

The Popover Menu that will be displayed when this item is selected.

MenuBarItemv2(string, IEnumerable<View>)

Creates a new instance of MenuBarItemv2 with the menuItems automatcialy added to a PopoverMenu. This is a helper for the most common MenuBar use-cases.

public MenuBarItemv2(string commandText, IEnumerable<View> menuItems)

Parameters

commandText string

The text to display for the command.

menuItems IEnumerable<View>

The menu items that will be added to the Popover Menu that will be displayed when this item is selected.