The following events can be used, but, they must be attach for each element:
GotKeyboardFocus, LostKeyboardFocus
Is there a way in .NET WPF to globally detect if
You can add a routed event handler to your main window and specify you're interested in handled events.
mainWindow.AddHandler( UIElement.GotKeyboardFocusEvent, OnElementGotKeyboardFocus, true );