CommandManager Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public ref class CommandManager sealed
public sealed class CommandManager
type CommandManager = class
Public NotInheritable Class CommandManager
- Inheritance
-
CommandManager
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.
Can |
Identifies the CanExecute attached event. |
Executed |
Identifies the Executed attached event. |
Preview |
Identifies the PreviewCanExecute attached event. |
Preview |
Identifies the PreviewExecuted attached event. |
Requery |
Occurs when the CommandManager detects conditions that might change the ability of a command to execute. |
Can |
Occurs when the CanExecute(Object, IInputElement) method on the RoutedCommand is called and the PreviewCanExecute event was not handled. |
Executed |
Occurs when the Execute(Object, IInputElement) method on the RoutedCommand is called and the PreviewExecuted event was not handled. |
Preview |
Occurs when the CanExecute(Object, IInputElement) method on the RoutedCommand is called. |
Preview |
Occurs when the Execute(Object, IInputElement) method on the RoutedCommand is called. |
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: