Windows Phone XAML apps support 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.
ICommand interface defines the following three members:
CanExecute(object)—A method called by the commanding infrastructure, which automatically sets the enabled state of the target control
Execute(object)—A method that performs the logic of the command ...