Bewerken

Share via


Keyboard.ClearFocus Method

Definition

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