How can I determine which UI element has focus?
You can always determine which UI element has focus by checking the static FocusManager.GetFocusedElement() method, passing a reference to the window that contains the user interface elements you want to check. For example:
IInputElement focusedElement = FocusManager.GetFocusedElement(thisWindow);
© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 08/16/11
Comment or report problem with topic
