Dela via


FocusManager.FindNextElement Method

Definition

Overloads

FindNextElement(FocusNavigationDirection)

Retrieves the element that should receive focus based on the specified navigation direction.

FindNextElement(FocusNavigationDirection, FindNextElementOptions)

Retrieves the element that should receive focus based on the specified navigation direction (cannot be used with tab navigation, see remarks).

FindNextElement(FocusNavigationDirection)

Retrieves the element that should receive focus based on the specified navigation direction.

public:
 static DependencyObject ^ FindNextElement(FocusNavigationDirection focusNavigationDirection);
/// [Windows.Foundation.Metadata.Overload("FindNextElement")]
 static DependencyObject FindNextElement(FocusNavigationDirection const& focusNavigationDirection);
[Windows.Foundation.Metadata.Overload("FindNextElement")]
public static DependencyObject FindNextElement(FocusNavigationDirection focusNavigationDirection);
function findNextElement(focusNavigationDirection)
Public Shared Function FindNextElement (focusNavigationDirection As FocusNavigationDirection) As DependencyObject

Parameters

focusNavigationDirection
FocusNavigationDirection

The direction that focus moves from element to element within the app UI.

Returns

The next object to receive focus.

Attributes

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Remarks

We recommend using this method instead of FindNextFocusableElement(FocusNavigationDirection). FindNextFocusableElement retrieves a UIElement, which returns null if the next focusable element is not a UIElement (such as a Hyperlink object).

See also

Applies to

FindNextElement(FocusNavigationDirection, FindNextElementOptions)

Retrieves the element that should receive focus based on the specified navigation direction (cannot be used with tab navigation, see remarks).

public:
 static DependencyObject ^ FindNextElement(FocusNavigationDirection focusNavigationDirection, FindNextElementOptions ^ focusNavigationOptions);
/// [Windows.Foundation.Metadata.Overload("FindNextElementWithOptions")]
 static DependencyObject FindNextElement(FocusNavigationDirection const& focusNavigationDirection, FindNextElementOptions const& focusNavigationOptions);
[Windows.Foundation.Metadata.Overload("FindNextElementWithOptions")]
public static DependencyObject FindNextElement(FocusNavigationDirection focusNavigationDirection, FindNextElementOptions focusNavigationOptions);
function findNextElement(focusNavigationDirection, focusNavigationOptions)
Public Shared Function FindNextElement (focusNavigationDirection As FocusNavigationDirection, focusNavigationOptions As FindNextElementOptions) As DependencyObject

Parameters

focusNavigationDirection
FocusNavigationDirection

The direction that focus moves from element to element within the app UI.

focusNavigationOptions
FindNextElementOptions

The options to help identify the next element to receive focus with keyboard/controller/remote navigation.

Returns

The next object to receive focus.

Attributes

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Remarks

We recommend using this method instead of FindNextFocusableElement(FocusNavigationDirection). FindNextFocusableElement retrieves a UIElement, which returns null if the next focusable element is not a UIElement (such as a Hyperlink object).

Tab navigation (FocusNavigationDirection.Previous and FocusNavigationDirection.Next) cannot be used with FindNextElementOptions. Only directional navigation (FocusNavigationDirection.Up, FocusNavigationDirection.Down, FocusNavigationDirection.Left, or FocusNavigationDirection.Right) is valid.

See also

Applies to