Constructor MenuBarItemv2
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
ViewThe View that
command
will be invoked on when user does something that causes the MenuBarItems's Accept event to be raised.command
CommandThe Command to invoke on
targetView
. The KeytargetView
has bound tocommand
will be used as KeycommandText
stringThe text to display for the command.
popoverMenu
PopoverMenuThe 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
stringThe text to display for the command.
popoverMenu
PopoverMenuThe 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
stringThe 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.