CommandManager::InvalidateRequerySuggested Method

Forces the CommandManager to raise the RequerySuggested event.

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

public:
static void InvalidateRequerySuggested()

The CommandManager only pays attention to certain conditions in determining when the command target has changed, such as change in keyboard focus. In situations where the CommandManager does not sufficiently determine a change in conditions that cause a command to not be able to execute, InvalidateRequerySuggested can be called to force the CommandManager to raise the RequerySuggested event.

The following example uses a DispatcherTimer to periodically call InvalidateRequerySuggested to force the CommandManager to raise the RequerySuggested event.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft