To be clearer. I need to know which element stole focus in the focused element LostFocus event. Something like this:
- I have 3 buttons: A, B and C
- "Button A" has focus
- "Button C" is clicked
- "Button A" LostFocus event is triggered
- In there I want to know that "Button C" stole the focus (Could've also been "Button B")
Let me know if there's a way to accomplish this.
Thanks!
You can always check the FocusManager.GetFocusedElement(dObj) to get the focused element within a given DependencyObject. So, in your scenario above, it will be something like this:
Event Handler: