# TabViewEqualWidthPanel

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-themes-winui/primitives/struct-tabviewequalwidthpanel/

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

```rust
struct TabViewEqualWidthPanel
```

Lays out its children side by side, every one as wide as the others: the width the panel has
for them divided by their number, but not less than `MinItemWidth` and not more than
`MaxItemWidth` (TabView's `TabWidthMode="Equal"`). The children shrink with the width of the
panel down to the minimum; more children than fit at the minimum make the panel as wide as
they are, so that the scroll viewer around it scrolls them.

The width the panel has is the width it is measured with. In a scroll viewer that scrolls
horizontally, which measures its content with an infinite width, it is the width the viewport
offers the panel: the viewport less the padding of the scroll content presenter and less the
width the other content of the scroll viewer takes beside the panel (the header and the footer
of the strip, its padding), with the room the scroll buttons take while the content overflows
given back: TabView computes the width of its tabs from the width of its strip without the
scroll buttons, and hides them when the tabs fit. A new width of the viewport measures the
panel again. Without a width (an infinite one, or a viewport that has not been laid out yet)
every child has the maximum width, as in TabView. Hidden children are left out.

The children are arranged from the left; with `FlowDirection` right to left the framework
mirrors the panel, so that the first child is at the right, as the tabs of TabView are.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.WinUI/Primitives/tab_view_equal_width_panel.rs#L56)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`min_item_width_property`](#function-min_item_width_property)
- [`max_item_width_property`](#function-max_item_width_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`min_item_width`](#function-min_item_width)
- [`set_min_item_width`](#function-set_min_item_width)
- [`max_item_width`](#function-max_item_width)
- [`set_max_item_width`](#function-set_max_item_width)
- [`item_width`](#function-item_width)

<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.Themes.WinUI/Primitives/tab_view_equal_width_panel.rs#L82)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.WinUI/Primitives/tab_view_equal_width_panel.rs#L82)

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

### min_item_width_property

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

Defines the `MinItemWidth` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.WinUI/Primitives/tab_view_equal_width_panel.rs#L93)

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

### max_item_width_property

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

Defines the `MaxItemWidth` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.WinUI/Primitives/tab_view_equal_width_panel.rs#L93)

<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.Themes.WinUI/Primitives/tab_view_equal_width_panel.rs#L232)

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

### new

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

Creates a panel of tabs of equal width.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.WinUI/Primitives/tab_view_equal_width_panel.rs#L242)

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

### min_item_width

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

The minimum width of a child (`TabViewItemMinWidth`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.WinUI/Primitives/tab_view_equal_width_panel.rs#L247)

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

### set_min_item_width

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.WinUI/Primitives/tab_view_equal_width_panel.rs#L251)

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

### max_item_width

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

The maximum width of a child (`TabViewItemMaxWidth`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.WinUI/Primitives/tab_view_equal_width_panel.rs#L256)

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

### set_max_item_width

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.WinUI/Primitives/tab_view_equal_width_panel.rs#L260)

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

### item_width

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

The width of every child, as the last measure computed it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.WinUI/Primitives/tab_view_equal_width_panel.rs#L265)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `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`
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- [`PanelImplExt`](/docs/0.5.0/api/ferroui-controls/trait-panelimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<TabViewEqualWidthPanel>`](/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/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`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/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`INavigableContainer`](/docs/0.5.0/api/ferroui-base/input/trait-inavigablecontainer/)

## Availability

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