The RoutedCommand class falls under the System.Windows.Input namespace, and provides two methods named CanExecute and Execute. The CanExecute method indicates whether the command is available, whereas the Execute method executes the command.
The RoutedCommand objects are basically empty shells and can't contain the implementation. For this to work, they look for a CommandBinding object from a target element that indicates the handler of the command. It registers the CanExecute and Execute methods to fire when the command associates with any control.
For example, in this demonstration, the AddCommand associated with the Button control has a CommandBinding, which denotes its CanExecute and Execute handler as CanExecute_AddCommand and Execute_AddCommand. When the button fires the Click event, it routes to the command binding to execute the associate command interface.