Constructor MenuBarItem
MenuBarItem(string, string, Action, Func<bool>?, MenuItem?)
Initializes a new MenuBarItem as a MenuItem.
public MenuBarItem(string title, string help, Action action, Func<bool>? canExecute = null, MenuItem? parent = null)
Parameters
title
stringTitle for the menu item.
help
stringHelp text to display. Will be displayed next to the Title surrounded by parentheses.
action
ActionAction to invoke when the menu item is activated.
canExecute
Func<bool>Function to determine if the action can currently be executed.
parent
MenuItemThe parent MenuItem of this if any.
MenuBarItem(string, MenuItem[], MenuItem?)
Initializes a new MenuBarItem.
public MenuBarItem(string title, MenuItem[] children, MenuItem? parent = null)
Parameters
title
stringTitle for the menu item.
children
MenuItem[]The items in the current menu.
parent
MenuItemThe parent MenuItem of this if any.
MenuBarItem(string, List<MenuItem[]>, MenuItem?)
Initializes a new MenuBarItem with separate list of items.
public MenuBarItem(string title, List<MenuItem[]> children, MenuItem? parent = null)
Parameters
title
stringTitle for the menu item.
children
List<MenuItem[]>The list of items in the current menu.
parent
MenuItemThe parent MenuItem of this if any.
MenuBarItem(MenuItem[])
Initializes a new MenuBarItem.
public MenuBarItem(MenuItem[] children)
Parameters
children
MenuItem[]The items in the current menu.
MenuBarItem()
Initializes a new MenuBarItem.
public MenuBarItem()