Constructor Shortcut
Shortcut()
Creates a new instance of Shortcut.
public Shortcut()
Shortcut(View, Command, string, string)
Creates a new instance of Shortcut, binding it to targetView
and
command
. The Key targetView
has bound to command
will be used as Key.
public Shortcut(View targetView, Command command, string commandText, string helpText)
Parameters
targetView
ViewThe View that
command
will be invoked on when user does something that causes the Shortcut'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.
helpText
stringThe help text to display.
Remarks
This is a helper API that simplifies creation of multiple Shortcuts when adding them to Bar-based objects, like MenuBarv2.
Shortcut(Key, string?, Action?, string?)
Creates a new instance of Shortcut.
public Shortcut(Key key, string? commandText, Action? action, string? helpText = null)
Parameters
key
KeycommandText
stringThe text to display for the command.
action
ActionhelpText
stringThe help text to display.
Remarks
This is a helper API that mimics the V1 API for creating StatusItems.