MenuCommandService.AddCommand(MenuCommand) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a command handler to the menu command service.
public:
virtual void AddCommand(System::ComponentModel::Design::MenuCommand ^ command);
public virtual void AddCommand (System.ComponentModel.Design.MenuCommand command);
abstract member AddCommand : System.ComponentModel.Design.MenuCommand -> unit
override this.AddCommand : System.ComponentModel.Design.MenuCommand -> unit
Public Overridable Sub AddCommand (command As MenuCommand)
Parameters
- command
- MenuCommand
The MenuCommand to add.
Implements
Exceptions
command
is null
.
A command handler command
already exists.
Remarks
The AddCommand method adds a command handler to the menu command service. Command handlers do not define the text, shortcut, or placement of a menu item. Rather, they define the menu item's behavior if the item is clicked.
Applies to
See also
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.