Is there a global focus change event? I would like to be notified every time FocusManag开发者_开发技巧er.GetFocusedElement changes.
You can attach GotFocus
and LostFocus
event handlers on the root visual of your application (a page). Since these events are routed events they will bubble up the elements tree to the root every time focus changes inside your page.
I don't recall seeing such a feature. In theory you could use the VisualTreeHelper to traverse the GUI and attach to Focus events of your controls.
精彩评论