# DockPanel

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/struct-dockpanel/

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

```rust
struct DockPanel
```

A panel which arranges its children at the top, bottom, left, right or
center.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`dock_property`](#function-dock_property)
- [`last_child_fill_property`](#function-last_child_fill_property)
- [`horizontal_spacing_property`](#function-horizontal_spacing_property)
- [`vertical_spacing_property`](#function-vertical_spacing_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`get_dock`](#function-get_dock)
- [`set_dock`](#function-set_dock)
- [`last_child_fill`](#function-last_child_fill)
- [`set_last_child_fill`](#function-set_last_child_fill)
- [`horizontal_spacing`](#function-horizontal_spacing)
- [`set_horizontal_spacing`](#function-set_horizontal_spacing)
- [`vertical_spacing`](#function-vertical_spacing)
- [`set_vertical_spacing`](#function-set_vertical_spacing)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

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

<a id="function-to_ref"></a>

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<DockPanel>
```

Returns a strong reference to this object.

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

<a id="function-dock_property"></a>

### dock_property

```rust
fn dock_property() -> &'static AttachedProperty<Dock>
```

Defines the `Dock` attached property.

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

<a id="function-last_child_fill_property"></a>

### last_child_fill_property

```rust
fn last_child_fill_property() -> &'static StyledProperty<bool>
```

Defines the `LastChildFill` property.

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

<a id="function-horizontal_spacing_property"></a>

### horizontal_spacing_property

```rust
fn horizontal_spacing_property() -> &'static StyledProperty<f64>
```

Defines the `HorizontalSpacing` property.

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

<a id="function-vertical_spacing_property"></a>

### vertical_spacing_property

```rust
fn vertical_spacing_property() -> &'static StyledProperty<f64>
```

Defines the `VerticalSpacing` property.

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

<a id="function-construct"></a>

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

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

<a id="function-new"></a>

### new

```rust
fn new() -> Ref<Self>
```



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

<a id="function-get_dock"></a>

### get_dock

```rust
fn get_dock(control: &Control) -> Dock
```

Gets the value of the `Dock` attached property on the specified
control.

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

<a id="function-set_dock"></a>

### set_dock

```rust
fn set_dock(control: &Control, value: Dock)
```

Sets the value of the `Dock` attached property on the specified
control.

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

<a id="function-last_child_fill"></a>

### last_child_fill

```rust
fn last_child_fill(self: &Self) -> bool
```

Whether the last child of the panel fills the remaining space in the
panel.

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

<a id="function-set_last_child_fill"></a>

### set_last_child_fill

```rust
fn set_last_child_fill(self: &Self, value: bool)
```



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

<a id="function-horizontal_spacing"></a>

### horizontal_spacing

```rust
fn horizontal_spacing(self: &Self) -> f64
```

The horizontal distance between the child objects.

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

<a id="function-set_horizontal_spacing"></a>

### set_horizontal_spacing

```rust
fn set_horizontal_spacing(self: &Self, value: f64)
```



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

<a id="function-vertical_spacing"></a>

### vertical_spacing

```rust
fn vertical_spacing(self: &Self) -> f64
```

The vertical distance between the child objects.

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

<a id="function-set_vertical_spacing"></a>

### set_vertical_spacing

```rust
fn set_vertical_spacing(self: &Self, value: f64)
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- [`PanelImplExt`](/docs/0.5.0/api/ferroui-controls/trait-panelimplext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<DockPanel>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`PanelImpl`](/docs/0.5.0/api/ferroui-controls/trait-panelimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)

## Availability

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