CommandManager Class
Provides command related utility methods that register CommandBinding and InputBinding objects for class owners and commands, add and remove command event handlers, and provides services for querying the status of a command.
Assembly: PresentationCore (in PresentationCore.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | CanExecuteEvent | Identifies the CanExecute attached event. |
![]() ![]() | ExecutedEvent | Identifies the Executed attached event. |
![]() ![]() | PreviewCanExecuteEvent | Identifies the PreviewCanExecute attached event. |
![]() ![]() | PreviewExecutedEvent | Identifies the PreviewExecuted attached event. |
| Name | Description | |
|---|---|---|
![]() ![]() | RequerySuggested | Occurs when the CommandManager detects conditions that might change the ability of a command to execute. |
| Name | Description | |
|---|---|---|
![]() ![]() | CanExecute | Occurs when the CanExecute method on the RoutedCommand is called and the PreviewCanExecute event was not handled. |
![]() ![]() | Executed | Occurs when the Execute method on the RoutedCommand is called and the PreviewExecuted event was not handled. |
![]() ![]() | PreviewCanExecute | Occurs when the CanExecute method on the RoutedCommand is called. |
![]() ![]() | PreviewExecuted | Occurs when the Execute method on the RoutedCommand is called. |
The CommandManager is responsible for managing routed commands. For more information about commanding, see Commanding Overview.
Use RegisterClassCommandBinding to register a CommandBinding to a class as opposed to an instance.
Use RegisterClassInputBinding to register an InputBinding to a class as opposed to an instance.
The InvalidateRequerySuggested method forces the CommandManager to raise the RequerySuggested event. The RequerySuggested event informs a command source to query the command it is associated with to determine whether or not the command can execute.
Available since 3.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.



