WPF: Defines a command that implements ICommand and is routed through the element tree.
The WPF implementation of ICommand
is the RoutedCommand
class.
The main sources of input in WPF are the mouse, the keyboard, ink, and routed commands. The more device-oriented inputs use a RoutedEvent
to notify objects in an application page that an input event has occurred. A RoutedCommand
is no different. The Execute and CanExecute
methods of a RoutedCommand
do not contain the application logic for the command, but rather they raise routed events that tunnel and bubble through the element tree until they encounter an object with a CommandBinding
. The CommandBinding
contains the handlers for these events and it is the handlers that perform the command.