ICommands
The Commands API includes functionality for creating Custom Commands and menus.
See the Samples for more examples of how to create custom commands and menus.
Properties
Name | Type | Description |
---|---|---|
Events | ICommandsEvents | Returns the event registering interface of the ICommands interface. |
Methods
Name | Description |
---|---|
AddCustomCommandToMenu | Adds existing custom command to the specified context menu location. |
CreateCustomCommand | Creates a custom command that can be added to the application toolbar or to the contextmenu. |
CreateSubMenuItem | Creates a new SubMenu for already created Menu. |
CreateTaskbarGroup | Creates new custom task bar group for custom commands. NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any future release. Use of this feature is not recommended for production environments. NOTE: If multiple task bar groups are created for the same MenuLocation with the same orderPriority, their relative ordering is unspecified and may vary between runs, sessions or versions. Do not rely on a particular order for groups with equal priority — assign distinct orderPriority values to guarantee a deterministic ordering (lower values are shown first). |
DeleteCustomCommand | Deletes a custom command. The command is automatically removed. |
ExecuteCommand | Executes a user command. |
GetCommandName | Resolves the name that has been associated with the given command id. |
GetCommandState | Gets the command state for builtin or custom command in specified location. |
GetMenuIdOfBuiltInCommand | Gets the MenuItem ID of a built-in command by its command ID and location. |
RemoveCustomCommandFromMenu | Removes a custom command from the specified menu location. |
RemoveMenuItem | Removes menuitem from the menu. |
RemoveTaskbarGroup | Removes custom task bar group from the task bar. NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any future release. Use of this feature is not recommended for production environments. |
SetCommandState | Sets the command's state to be hidden, visible, enabled or disabled. Calling this method may affect context menu, application toolbar, menus or all of them. |
SetIcon | Sets the icon for a custom command. NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any future release. Use of this feature is not recommended for production environments. |
SetMenuItemState | Sets the MenuItem state individually. |
SetTaskbarGroupIcon | Sets the icon for a custom task bar group. NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any future release. Use of this feature is not recommended for production environments. |