<span class="kwrd">public</span> <span class="kwrd">static</span> Object GetFocusedElement();
Using the FocusManager is easy. Here’s a small example of a possible usage:
var focusedElement = FocusManager.GetFocusedElement() as Control; if (focusedElement != null) Output.Text = focusedElement.Name;
One last note: The FocusManager class is also available in the “normal” .NET Framework 3.0 or later.