UIElement.MoveFocus(TraversalRequest) Method

Definition

Attempts to move focus from this element to another element. The direction to move focus is specified by a guidance direction, which is interpreted within the organization of the visual parent for this element.

C#
public virtual bool MoveFocus(System.Windows.Input.TraversalRequest request);

Parameters

request
TraversalRequest

A traversal request, which contains a property that indicates either a mode to traverse in existing tab order, or a direction to move visually.

Returns

true if the requested traversal was performed; otherwise, false.

Remarks

Make sure you check the return value of this method. A return value of false might be returned if the traversal runs into a tab stop that is defined by a control's composition, and the traversal request did not request to wrap.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also