It depends on the type of focus you are using, Logical or Keyboard .
Keyboard focus refers to an element that receives keyboard input, and logical focus refers to an element in the focus area that has focus.
FocusManager receives an element with logical focus within the specified focus area, in this case Window ( this ):
IInputElement focusedControl = FocusManager.GetFocusedElement(this);
Keyboard will return an item with the current keyboard input focus:
IInputElement focusedControl = Keyboard.FocusedElement;
sa_ddam213 Oct 15 '13 at 22:50 2013-10-15 22:50
source share