Keyboard.ClearFocus Method ()

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Clears focus.

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

public static void ClearFocus()

If focus is within a Win32 window, WPF calls the ClearFocus method on restoration of focus when a menu is closed.

When leaving menu mode, Win32 focus is returned to the hosted child HWND, and no element has WPF focus.

.NET Framework
Available since 4.0
Return to top
Show: