This documentation is archived and is not being maintained.

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.

Namespace:  System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

public sealed class CommandManager
You cannot directly create an instance of this class in XAML.

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.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0