Defines the contract for commanding.
.NET: This interface appears as System.Windows.Input.ICommand.
The ICommand interface inherits from the IUnknown interface. ICommand also has these types of members:
The ICommand interface has these events.
|CanExecuteChanged||Occurs when changes occur that affect whether the command should execute.|
The ICommand interface has these methods. It also inherits methods from the Object class.
|CanExecute||Defines the method that determines whether the command can execute in its current state.|
|Execute||Defines the method to be called when the command is invoked.|
When building Windows Store apps with the Microsoft .NET Framework, this interface is hidden and developers should use the System.Windows.Input.ICommand interface.
Note Older versions of Microsoft .NET Framework reference documentation indicate that the System.Windows.Input.ICommand interface is defined in PresentationCore, which is a Windows Presentation Foundation (WPF) assembly. That is no longer the case, System.Windows.Input.ICommand is defined in the System.ObjectModel assembly, so you don't need to take WPF dependencies in order to implement ICommand.
Minimum supported client
Minimum supported server
|Windows Server 2012|
Build date: 11/16/2013