Focus Event Args. Try Set New Focused Element(DependencyObject) Method
Attempts to redirect focus from the targeted element to the specified element.
public: virtual bool TrySetNewFocusedElement(DependencyObject ^ element) = TrySetNewFocusedElement;
bool TrySetNewFocusedElement(DependencyObject const & element);
public bool TrySetNewFocusedElement(DependencyObject element);
Public Function TrySetNewFocusedElement (element As DependencyObject) As Boolean
The object on which to set focus.
True, if the focus action is redirected; otherwise, false.
GettingFocus and LosingFocus are raised synchronously, while GotFocus and LostFocus are raised asynchronously. For example, if your app calls the Focus method of a control, GettingFocus is raised during the call, but GotFocus is raised after the call completes.
If focus is moved while these events are still bubbling, an exception is thrown.