Constructor MenuBarItem
MenuBarItem()
Creates a new instance of MenuBarItem.
public MenuBarItem()
MenuBarItem(View?, Command, string?, PopoverMenu?)
Creates a new instance of MenuBarItem. Each MenuBarItem typically has a PopoverMenu that is shown when the item is selected.
public MenuBarItem(View? targetView, Command command, string? commandText, PopoverMenu? popoverMenu = null)
Parameters
targetViewViewThe View that
commandwill be invoked on when user does something that causes the MenuBarItems's Accept event to be raised.commandCommandThe Command to invoke on
targetView. The KeytargetViewhas bound tocommandwill be used as KeycommandTextstringThe text to display for the command.
popoverMenuPopoverMenuThe Popover Menu that will be displayed when this item is selected.
MenuBarItem(string, PopoverMenu?)
Creates a new instance of MenuBarItem with the specified popoverMenu. This is a
helper for the most common MenuBar use-cases.
public MenuBarItem(string commandText, PopoverMenu? popoverMenu = null)
Parameters
commandTextstringThe text to display for the command.
popoverMenuPopoverMenuThe Popover Menu that will be displayed when this item is selected.
MenuBarItem(string, IEnumerable<View>)
Creates a new instance of MenuBarItem with the menuItems automatcialy added to a
PopoverMenu.
This is a helper for the most common MenuBar use-cases.
public MenuBarItem(string commandText, IEnumerable<View> menuItems)
Parameters
commandTextstringThe text to display for the command.
menuItemsIEnumerable<View>The menu items that will be added to the Popover Menu that will be displayed when this item is selected.