Defines the contract for commanding.
Assembly: System.Windows (in System.Windows.dll)
Thetype exposes the following members.
The interface enables the abstraction of a parameterized method call through its Execute method. In addition, you determine whether a method can be called prior to calling it with the CanExecute method.
Typically objects implement this interface to enable method calls on the objects through the use of XAML bindings. This is particularly useful in Model-View-ViewModel (MVVM) scenarios, as it allows models to expose commands to which controls such as buttons can be bound to without requiring additional code.
Silverlight 5 implements a limited commanding surface area, rather than an entire commanding infrastructure that is equivalent to commanding in WPF. The classes that support command-initiated user interaction are the following:
You can bind the Command property of these objects and their derived classes to instances of objects that implement . In addition, the interface exists for compatibility, which is helpful if control authors migrate WPF code-defined or particularly markup-defined command bindings for a Silverlight implementation.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.