Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Silverlight for Windows Phone supports the ICommand interface for buttons and various other controls. Commands are useful because when exposed from a viewmodel they allow your view to bind to them just like other properties; when the user interacts with the visual element, the command is executed. This enables you to move your UI logic from event handlers to higher level classes.
The ICommand interface defines the following three members:
• CanExecute(object)—A method called by the Silverlight commanding infrastructure, which automatically sets the enabled state of the target control
• Execute(object)—A method that performs the logic of the command
• CanExecuteChanged—An event that signals that the Silverlight commanding infrastructure should reevaluate the executable state of the command by calling its CanExecute method