Redigera

Dela via


Behavior.FindCommand(CommandID) Method

Definition

Intercepts commands.

public:
 virtual System::ComponentModel::Design::MenuCommand ^ FindCommand(System::ComponentModel::Design::CommandID ^ commandId);
public virtual System.ComponentModel.Design.MenuCommand FindCommand (System.ComponentModel.Design.CommandID commandId);
public virtual System.ComponentModel.Design.MenuCommand? FindCommand (System.ComponentModel.Design.CommandID commandId);
abstract member FindCommand : System.ComponentModel.Design.CommandID -> System.ComponentModel.Design.MenuCommand
override this.FindCommand : System.ComponentModel.Design.CommandID -> System.ComponentModel.Design.MenuCommand
Public Overridable Function FindCommand (commandId As CommandID) As MenuCommand

Parameters

commandId
CommandID

A CommandID object.

Returns

A MenuCommand. By default, FindCommand(CommandID) returns null.

Remarks

The FindCommand method is called from the BehaviorService. It provides an opportunity for the Behavior to return its own custom MenuCommand, thereby intercepting this message.

Applies to

See also