2

While keyboard navigating a WPF app, in one step, between one control and another, the Keyboard.FocusedElement is null. If there is no reference to this property in the code, which methods can cause this? Is there an Unfocus method for any control?

Jader Dias
  • 88,211
  • 155
  • 421
  • 625

1 Answers1

4

One way this could happen is if focus is on a control and then the Focusable property of that control is set to false. Keyboard.FocusedElement would then be null.

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
Robert Levy
  • 28,747
  • 6
  • 62
  • 94