DelegateCommand<T> Class 
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Implementation of ICommand where the Execute and CanExecute callbacks are handled by delegates.
generic <typename T>
public ref class DelegateCommand : Microsoft::VisualStudio::PlatformUI::DelegateCommandBase, System::Windows::Input::ICommandpublic class DelegateCommand<T> : Microsoft.VisualStudio.PlatformUI.DelegateCommandBase, System.Windows.Input.ICommandtype DelegateCommand<'T> = class
    inherit DelegateCommandBase
    interface ICommandPublic Class DelegateCommand(Of T)
Inherits DelegateCommandBase
Implements ICommandType Parameters
- T
The parameter type for the Execute and CanExecute delegates
- Inheritance
- Derived
- Implements
Constructors
| DelegateCommand<T>(Action<T>, JoinableTaskFactory) | Initializes a new instance of the DelegateCommand<T> class. Using this constructor to initialize the DelegateCommand results in a command that can always execute. | 
| DelegateCommand<T>(Action<T>, Predicate<T>, JoinableTaskFactory) | Initializes a new instance of the DelegateCommand<T> class. | 
| DelegateCommand<T>(Action<T>, Predicate<T>) | Initializes a new instance of the DelegateCommand<T> class. | 
| DelegateCommand<T>(Action<T>) | Initializes a new instance of the DelegateCommand<T> class. Using this constructor to initialize the DelegateCommand results in a command that can always execute. | 
Methods
| CanExecute(Object) | Gets a value indicating whether this command is executable. | 
| CanExecuteDependsOn(INotifyPropertyChanged, String) | Adds a property upon which this command's CanExecute state depends. When the property changes, this command will raise CanExecuteChanged(Inherited from DelegateCommandBase) | 
| Execute(Object) | Executes the command. | 
| RaiseCanExecuteChanged() | Raises the CanExecuteChanged event.(Inherited from DelegateCommandBase) | 
Events
| CanExecuteChanged | An event that is fired when the executable state of this command changes. Call RaiseCanExecuteChanged to force listeners to update.(Inherited from DelegateCommandBase) |