# XYFocusNavigationStrategy

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/input/navigation/enum-xyfocusnavigationstrategy/

**enum** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
enum XYFocusNavigationStrategy
```

Specifies the disambiguation strategy used for navigating between
multiple candidate targets with directional (XY) navigation.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/navigation/xy_focus_navigation_strategy.rs#L5)

## Members

- [`Auto`](#variant-auto)
- [`Projection`](#variant-projection)
- [`NavigationDirectionDistance`](#variant-navigationdirectiondistance)
- [`RectilinearDistance`](#variant-rectilineardistance)

<a id="variant-auto"></a>

### Auto

```rust
Auto = 0
```

Indicates that navigation strategy is inherited from the element's
ancestors. If all ancestors have a value of `Auto`, the fallback
strategy is `Projection`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/navigation/xy_focus_navigation_strategy.rs#L10)

<a id="variant-projection"></a>

### Projection

```rust
Projection = 1
```

Indicates that focus moves to the first element encountered when
projecting the edge of the currently focused element in the direction
of navigation.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/navigation/xy_focus_navigation_strategy.rs#L14)

<a id="variant-navigationdirectiondistance"></a>

### NavigationDirectionDistance

```rust
NavigationDirectionDistance = 2
```

Indicates that focus moves to the element closest to the axis of the
navigation direction.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/navigation/xy_focus_navigation_strategy.rs#L17)

<a id="variant-rectilineardistance"></a>

### RectilinearDistance

```rust
RectilinearDistance = 3
```

Indicates that focus moves to the closest element based on the
shortest 2D distance (Manhattan metric).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/navigation/xy_focus_navigation_strategy.rs#L20)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ResourceKeyObject`](/docs/0.5.0/api/ferroui-base/controls/trait-resourcekeyobject/)
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Copy`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)
- [`ValueTypeRegistration`](/docs/0.5.0/api/ferroui-base/data/core/trait-valuetyperegistration/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
