I'm navigating with the keyboard, and I can't find visually which element has the focus. While debugging I managed to break the execution in a method inside the Window but I don't know which property will reveal the current focused control.
How to find out which element has focus when debugging WPF?
Use Snoop and look for the events in events tab. Select all the events you want to listen from the events combo box. As you move through your application you can see the tab refreshing with new controls that are receiving those events.
I didn't need to look for events. In the footer it showed the current focused element. –
Policlinic
I meant GotKeyboardFocus event –
Fleabitten
No need for that. It reads the
Keyboard.FocusedElement
property. –
Policlinic © 2022 - 2024 — McMap. All rights reserved.