Share via


DelegateCommand<T> Members

Include Protected Members
Include Inherited Members

The DelegateCommand<T> type exposes the following members.

Constructors

  Name Description
Public method DelegateCommand<T>(Action<T>)
Initializes a new instance of DelegateCommand<T>.
Public method DelegateCommand<T>(Action<T>, Func<T, Boolean>)
Initializes a new instance of DelegateCommand<T>.

Methods

  Name Description
Public method CanExecute(T)
Determines if the command can execute by invoked the Func<T, TResult> provided during construction.
Protected method CanExecute(Object)
Determines if the command can execute with the provided parameter by invoing the Func<T, TResult> supplied during construction.
(Inherited from DelegateCommandBase.)
Public method Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public method Execute(T)
Executes the command and invokes the Action<T> provided during construction.
Protected method Execute(Object)
Executes the command with the provided parameter by invoking the Action<T> supplied during construction.
(Inherited from DelegateCommandBase.)
Protected method Finalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public method GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected method OnCanExecuteChanged
Raises CanExecuteChanged on the UI thread so every command invoker can requery CanExecute(Object) to check if the CompositeCommand can execute.
(Inherited from DelegateCommandBase.)
Protected method OnIsActiveChanged
This raises the IsActiveChanged event.
(Inherited from DelegateCommandBase.)
Public method RaiseCanExecuteChanged
Raises CanExecuteChanged on the UI thread so every command invoker can requery to check if the command can execute.

Remarks

Note that this will trigger the execution of CanExecute(Object) once for each invoker.
(Inherited from DelegateCommandBase.)
Public method ToString
Returns a String that represents the current Object.
(Inherited from Object.)

Properties

  Name Description
Public property IsActive
Gets or sets a value indicating whether the object is active.
(Inherited from DelegateCommandBase.)

Events

  Name Description
Public event CanExecuteChanged
Occurs when changes occur that affect whether or not the command should execute.
(Inherited from DelegateCommandBase.)
Public event IsActiveChanged
Fired if the IsActive property changes.
(Inherited from DelegateCommandBase.)

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method ICommand.CanExecute (Inherited from DelegateCommandBase.)
Explicit interface implemetationPrivate method ICommand.Execute (Inherited from DelegateCommandBase.)

See Also

DelegateCommand<T> Class

Microsoft.Practices.Prism.Commands Namespace