Keyboard.ClearFocus Method
Definition
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.
Clears focus.
public:
static void ClearFocus();
public static void ClearFocus ();
static member ClearFocus : unit -> unit
Public Shared Sub ClearFocus ()
Remarks
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.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.