# ControlLayoutViewModel

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-diagnostics/diagnostics/view_models/struct-controllayoutviewmodel/

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

```rust
struct ControlLayoutViewModel
```

The layout of a control as the layout explorer shows it: the margin, the border and the
padding (which edit the control), the size and its constraints, and the alignments.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L16)

## Members

- [`new`](#function-new)
- [`margin_thickness`](#function-margin_thickness)
- [`set_margin_thickness`](#function-set_margin_thickness)
- [`border_thickness`](#function-border_thickness)
- [`set_border_thickness`](#function-set_border_thickness)
- [`padding_thickness`](#function-padding_thickness)
- [`set_padding_thickness`](#function-set_padding_thickness)
- [`width`](#function-width)
- [`height`](#function-height)
- [`width_constraint`](#function-width_constraint)
- [`height_constraint`](#function-height_constraint)
- [`horizontal_alignment`](#function-horizontal_alignment)
- [`set_horizontal_alignment`](#function-set_horizontal_alignment)
- [`vertical_alignment`](#function-vertical_alignment)
- [`set_vertical_alignment`](#function-set_vertical_alignment)
- [`has_padding`](#function-has_padding)
- [`has_border`](#function-has_border)
- [`control_property_changed`](#function-control_property_changed)

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

### new

```rust
fn new(control: &Visual) -> Rc<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L68)

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

### margin_thickness

```rust
fn margin_thickness(self: &Self) -> Thickness
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L117)

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

### set_margin_thickness

```rust
fn set_margin_thickness(self: &Self, value: Thickness)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L121)

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

### border_thickness

```rust
fn border_thickness(self: &Self) -> Thickness
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L125)

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

### set_border_thickness

```rust
fn set_border_thickness(self: &Self, value: Thickness)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L129)

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

### padding_thickness

```rust
fn padding_thickness(self: &Self) -> Thickness
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L133)

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

### set_padding_thickness

```rust
fn set_padding_thickness(self: &Self, value: Thickness)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L137)

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

### width

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L141)

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

### height

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L149)

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

### width_constraint

```rust
fn width_constraint(self: &Self) -> Option<String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L157)

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

### height_constraint

```rust
fn height_constraint(self: &Self) -> Option<String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L165)

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

### horizontal_alignment

```rust
fn horizontal_alignment(self: &Self) -> HorizontalAlignment
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L173)

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

### set_horizontal_alignment

```rust
fn set_horizontal_alignment(self: &Self, value: HorizontalAlignment)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L177)

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

### vertical_alignment

```rust
fn vertical_alignment(self: &Self) -> VerticalAlignment
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L181)

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

### set_vertical_alignment

```rust
fn set_vertical_alignment(self: &Self, value: VerticalAlignment)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L185)

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

### has_padding

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L189)

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

### has_border

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L193)

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

### control_property_changed

```rust
fn control_property_changed(self: &Self, e: &FerroPropertyChangedEventArgs<'_>)
```

Follows a change of a property of the control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_layout_view_model.rs#L276)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`TreeModel`](/docs/0.5.0/api/ferroui-treedatagrid-core/accessor/trait-treemodel/)
- `PartialEq`
- [`INotifyPropertyChanged`](/docs/0.5.0/api/ferroui-base/data/model/use-inotifypropertychanged/)
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)

## Availability

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