# PlacementMode

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/enum-placementmode/

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

```rust
enum PlacementMode
```

Defines the placement for a popup control.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L4)

## Members

- [`Pointer`](#variant-pointer)
- [`Bottom`](#variant-bottom)
- [`Right`](#variant-right)
- [`Left`](#variant-left)
- [`Top`](#variant-top)
- [`Center`](#variant-center)
- [`AnchorAndGravity`](#variant-anchorandgravity)
- [`TopEdgeAlignedLeft`](#variant-topedgealignedleft)
- [`TopEdgeAlignedRight`](#variant-topedgealignedright)
- [`BottomEdgeAlignedLeft`](#variant-bottomedgealignedleft)
- [`BottomEdgeAlignedRight`](#variant-bottomedgealignedright)
- [`LeftEdgeAlignedTop`](#variant-leftedgealignedtop)
- [`LeftEdgeAlignedBottom`](#variant-leftedgealignedbottom)
- [`RightEdgeAlignedTop`](#variant-rightedgealignedtop)
- [`RightEdgeAlignedBottom`](#variant-rightedgealignedbottom)
- [`Custom`](#variant-custom)

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

### Pointer

```rust
Pointer = 0
```

The popup is placed at the pointer position.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L7)

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

### Bottom

```rust
Bottom = 1
```

Preferred location is below the target element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L10)

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

### Right

```rust
Right = 2
```

Preferred location is to the right of the target element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L13)

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

### Left

```rust
Left = 3
```

Preferred location is to the left of the target element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L16)

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

### Top

```rust
Top = 4
```

Preferred location is above the target element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L19)

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

### Center

```rust
Center = 5
```

Preferred location is centered over the target element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L22)

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

### AnchorAndGravity

```rust
AnchorAndGravity = 6
```

The popup is placed according to the popup's placement anchor and
placement gravity rules.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L26)

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

### TopEdgeAlignedLeft

```rust
TopEdgeAlignedLeft = 7
```

Preferred location is above the target element, with the left edge
of the popup aligned with the left edge of the target element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L30)

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

### TopEdgeAlignedRight

```rust
TopEdgeAlignedRight = 8
```

Preferred location is above the target element, with the right edge
of popup aligned with right edge of the target element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L34)

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

### BottomEdgeAlignedLeft

```rust
BottomEdgeAlignedLeft = 9
```

Preferred location is below the target element, with the left edge
of popup aligned with left edge of the target element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L38)

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

### BottomEdgeAlignedRight

```rust
BottomEdgeAlignedRight = 10
```

Preferred location is below the target element, with the right edge
of popup aligned with right edge of the target element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L42)

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

### LeftEdgeAlignedTop

```rust
LeftEdgeAlignedTop = 11
```

Preferred location is to the left of the target element, with the
top edge of popup aligned with top edge of the target element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L46)

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

### LeftEdgeAlignedBottom

```rust
LeftEdgeAlignedBottom = 12
```

Preferred location is to the left of the target element, with the
bottom edge of popup aligned with bottom edge of the target element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L50)

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

### RightEdgeAlignedTop

```rust
RightEdgeAlignedTop = 13
```

Preferred location is to the right of the target element, with the
top edge of popup aligned with top edge of the target element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L54)

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

### RightEdgeAlignedBottom

```rust
RightEdgeAlignedBottom = 14
```

Preferred location is to the right of the target element, with the
bottom edge of popup aligned with bottom edge of the target element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L58)

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

### Custom

```rust
Custom = 15
```

A position and repositioning behavior that is defined by the popup's
custom popup placement callback.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/placement_mode.rs#L62)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`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/)
- `ErasedDestructor`
- `IntoEither`
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)
- [`ValueTypeRegistration`](/docs/0.5.0/api/ferroui-base/data/core/trait-valuetyperegistration/)
- `Clone`
- `Copy`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`

## Availability

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