DelegateCommand(T) Constructor (Action(T), Func(T, Boolean))

DelegateCommand<T> Constructor (Action<T>, Func<T, Boolean>)

Initializes a new instance of DelegateCommand<T>.

Namespace:  Microsoft.Practices.Composite.Presentation.Commands
Assembly:  Microsoft.Practices.Composite.Presentation (in Microsoft.Practices.Composite.Presentation.dll)

Microsoft.Practices.Composite.Presentation.Commands.DelegateCommand = function(executeMethod, canExecuteMethod);

Parameters

executeMethod
Type: System.Action<T>
Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate.
canExecuteMethod
Type: System.Func<T, Boolean>
Delegate to execute when CanExecute is called on the command. This can be null.

ExceptionCondition
System.ArgumentNullExceptionWhen both executeMethod and canExecuteMethod ar nulla null reference (Nothing in Visual Basic).
Show:
© 2016 Microsoft