XYFocusNavigationStrategyOverride Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies how the XAML framework determines the target of an XY navigation.
Overrides XYFocusKeyboardNavigationStrategyMode.
public enum class XYFocusNavigationStrategyOverride
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
enum class XYFocusNavigationStrategyOverride
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
public enum XYFocusNavigationStrategyOverride
Public Enum XYFocusNavigationStrategyOverride
- Inheritance
-
XYFocusNavigationStrategyOverride
- Attributes
Windows requirements
Device family |
Windows 10 Creators Update (introduced in 10.0.15063.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v4.0)
|
Fields
Name | Value | Description |
---|---|---|
None | 0 | No navigation override is applied. |
Auto | 1 | Indicates that navigation strategy is inherited from the element's ancestors. If all ancestors have a value of Auto, the fallback strategy is Projection. |
Projection | 2 | Indicates that focus moves to the first element encountered when projecting the edge of the currently focused element in the direction of navigation. Note Other factors, such as the previously focused element and proximity to the axis of the navigation direction, can influence the result. Focus moves from A to D on down navigation based on projection of the bottom edge of A |
NavigationDirectionDistance | 3 | Indicates that focus moves to the element closest to the axis of the navigation direction. The edge of the bounding rect corresponding to the navigation direction is extended and projected to identify candidate targets. The first element encountered is identified as the target. In the case of multiple candidates, the closest element is identified as the target. If there are still multiple candidates, the topmost/leftmost element is identified as the candidate. Focus moves from A to C and then from C to B on down navigation |
RectilinearDistance | 4 | Indicates that focus moves to the closest element based on the shortest 2D distance (Manhattan metric). This distance is calculated by adding the primary distance and the secondary distance of each potential candidate. In the case of a tie:
Here we show how focus moves from A to B based on rectilinear distance.
Focus moves from A to B based on rectilinear distance |
Remarks
XY navigation is used to navigate a user interface (UI) with a gamepad, remote control, or keyboard directional arrows. For more info, see Gamepad and remote control interactions