Behavior.FindCommand Method (CommandID)


Intercepts commands.

Namespace:   System.Windows.Forms.Design.Behavior
Assembly:  System.Design (in System.Design.dll)

public virtual MenuCommand FindCommand(
	CommandID commandId


Type: System.ComponentModel.Design.CommandID

A CommandID object.

Return Value

Type: System.ComponentModel.Design.MenuCommand

A MenuCommand. By default, FindCommand returns null.

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.

.NET Framework
Available since 2.0
Return to top