Constructor MenuItem
MenuItem()
Creates a new instance of MenuItem.
public MenuItem()
MenuItem(View?, Command, string?, string?, Menu?)
Creates a new instance of MenuItem, binding it to targetView and
command. The Key targetView
has bound to command will be used as Key.
public MenuItem(View? targetView, Command command, string? commandText = null, string? helpText = null, Menu? subMenu = null)
Parameters
targetViewViewThe View that
commandwill be invoked on when user does something that causes the Shortcut'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.
helpTextstringThe help text to display.
subMenuMenuThe submenu to display when the user selects this menu item.
MenuItem(string?, string?, Action?, Key?)
public MenuItem(string? commandText = null, string? helpText = null, Action? action = null, Key? key = null)
Parameters
MenuItem(string, Key, Action?)
public MenuItem(string commandText, Key key, Action? action = null)
Parameters
MenuItem(string?, string?, Menu?)
public MenuItem(string? commandText = null, string? helpText = null, Menu? subMenu = null)