February 14, 2014
Attempts to set the focus on the control.
Assembly: System.Windows (in System.Windows.dll)
In order to be focusable, the following must be true:
IsTabStop is set to true.
IsEnabled is set to true.
The control must be instantiated in the tree (the Loaded event has fired).
Although the "FocusedElement" value (exposed via GetFocusedElement method) is updated immediately, the change notifications of GotFocus and LostFocus occur asynchronously. This asychronous focusing design is intended to assure that elements that are created at run-time do not fail in calls to because the acting FocusManager was not updated to the latest view of the visual tree.