Command Members

Represents a command that can be fired by several UI Elements.

The following tables list the members exposed by the Command type.

Public Constructors

  Name Description
Public method Command Initializes a new instance of the Command class.

Top

Public Properties

(see also Protected Properties )

  Name Description
Public property Adapters Returns a ReadOnlyCollection with the registered CommandAdapter.
Public property MapService This service is used by Command to create adapters for its invokers.
Public property Name Gets the name of the command.
Public property Status Gets or sets the status of the Command, which controls the visible/enabled behavior of both the Command and its associated UI elements.

Top

Protected Properties

  Name Description
Protected property TraceSource Used by injection to set the TraceSource to use for tracing.

Top

Public Methods

(see also Protected Methods )

  Name Description
Public method AddCommandAdapter Registers a CommandAdapter with this command.
Public method AddInvoker Adds a new invoker for this Command.
Public method Dispose Overloaded.  
Public method Equals  Overloaded. (Inherited from Object.)
Public method Execute Executes this Command by firing the ExecuteAction event.
Public method FindAdapters Returns a ReadOnlyCollection with the registered CommandAdapter which are of the type specified by TAdapter.
Public method GetHashCode  (Inherited from Object.)
Public method GetType  (Inherited from Object.)
Public method OnBuiltUp See OnBuiltUp for more information.
Public method OnTearingDown See OnTearingDown for more information.
Public method Static ReferenceEquals  (Inherited from Object.)
Public method RemoveCommandAdapter Removes the CommandAdapter from this command.
Public method RemoveInvoker Removes the invoker from the Command.
Public method ToString  (Inherited from Object.)

Top

Protected Methods

  Name Description
Protected method Dispose Overloaded.  
Protected method Finalize  (Inherited from Object.)
Protected method MemberwiseClone  (Inherited from Object.)
Protected method OnChanged Fires the Changed event for this command.
Protected method OnExecuteAction Handles the ExecuteCommand event and fires the ExecuteAction event accordingly.

Top

Public Events

  Name Description
Public event Changed This event signals that some of the command's properties have changed.
Public event ExecuteAction This event signals that this Command is executed. Handle this event to implement the actions to be executed when the command is fired.

Top

See Also

Reference

Command Class
Microsoft.Practices.CompositeUI.Commands Namespace