Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There is no generic way to specify application-wide commands in WPF and Silverlight. To overcome this issue, Catel introduces the CommandManager. This manager allows to create commands which are hosted by theĀ CommandManager. The commands on the command manager can be created with input gestures (on both WPF and Silverlight). Once a view model wants to hook into a specific command, it only has to register the view model command with the application-wide command.

Note

Note that application-wide commands by default are only available on the main window of an application. To support this on other windows, add the following code in the constructor of a window:

Code Block
new CommandManagerWrapper(this);

Creating application-wide commands

...