# MultiPage

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

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

```rust
struct MultiPage
```

Abstract base class for pages that host a collection of child pages.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`update_active_page_with`](#function-update_active_page_with)
- [`pages_property`](#function-pages_property)
- [`items_source_property`](#function-items_source_property)
- [`page_template_property`](#function-page_template_property)
- [`construct`](#function-construct)
- [`pages`](#function-pages)
- [`set_pages`](#function-set_pages)
- [`items_source`](#function-items_source)
- [`set_items_source`](#function-set_items_source)
- [`page_template`](#function-page_template)
- [`set_page_template`](#function-set_page_template)
- [`current_page_changed`](#function-current_page_changed)
- [`pages_changed`](#function-pages_changed)
- [`items_source_of`](#function-items_source_of)
- [`pages_items_source`](#function-pages_items_source)

<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/page/multi_page.rs#L44)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/multi_page.rs#L44)

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

### update_active_page_with

```rust
fn update_active_page_with(self: &Self, navigation_type: NavigationType)
```

Called when the active child page changes.

The base class calls this method in the following situations,
passing the corresponding navigation type:

- `NavigationType::Replace`: the `Pages` collection was
  assigned, a new item was added, or the active page changed for
  any reason not covered below.
- `NavigationType::Remove`: the currently active page was
  removed from the `Pages` collection or the collection was reset
  and the active page is no longer present. Subclasses should
  select a replacement page.

Subclasses may also call this method directly with any navigation
type appropriate for their own navigation model.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/multi_page.rs#L44)

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

### pages_property

```rust
fn pages_property() -> &'static StyledProperty<Option<PageList>>
```

Defines the `Pages` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/multi_page.rs#L163)

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

### items_source_property

```rust
fn items_source_property() -> &'static StyledProperty<Option<ItemsSource>>
```

Defines the `ItemsSource` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/multi_page.rs#L163)

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

### page_template_property

```rust
fn page_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
```

Defines the `PageTemplate` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/multi_page.rs#L163)

<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/page/multi_page.rs#L195)

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

### pages

```rust
fn pages(self: &Self) -> Option<PageList>
```

Gets or sets the collection of child pages.

This control subscribes to the changes of the assigned collection.
The subscription is released when a new collection is assigned or
when the control is detached from the visual tree.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/multi_page.rs#L210)

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

### set_pages

```rust
fn set_pages(self: &Self, value: Option<PageList>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/multi_page.rs#L214)

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

### items_source

```rust
fn items_source(self: &Self) -> Option<ItemsSource>
```

Gets or sets a view-model collection to bind to. Use together with
the page template to convert each item into a page. When set, takes
precedence over the `Pages` property as the item source for the
inner tab or carousel control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/multi_page.rs#L222)

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

### set_items_source

```rust
fn set_items_source(self: &Self, value: Option<ItemsSource>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/multi_page.rs#L226)

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

### page_template

```rust
fn page_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
```

Gets or sets the data template used to create pages from view-model
items.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/multi_page.rs#L232)

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

### set_page_template

```rust
fn set_page_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/multi_page.rs#L236)

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

### current_page_changed

```rust
fn current_page_changed(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
```

Occurs when the `CurrentPage` property changes.

Dropping the returned guard removes the handler;
`Subscription::detach` keeps it for the life of the page.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/multi_page.rs#L244)

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

### pages_changed

```rust
fn pages_changed(self: &Self, handler: impl Fn(&NotifyCollectionChangedEventArgs<'a, Ref<Page>>) -> () + 'static) -> Subscription
```

Occurs when the `Pages` collection changes.

Dropping the returned guard removes the handler;
`Subscription::detach` keeps it for the life of the page.

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

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

### items_source_of

```rust
fn items_source_of(pages: &PageList) -> ItemsSource
```

The untyped items list of a collection of pages, for the items source
of an items control: each page is an item boxed as a control. The
same handle is returned for the same collection for as long as a
handle is alive, so that assigning it twice is not a change.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/multi_page.rs#L275)

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

### pages_items_source

```rust
fn pages_items_source(self: &Self) -> Option<ItemsSource>
```

The value of the `Pages` property as the items source of an items
control. See `items_source_of`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/multi_page.rs#L294)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TemplatedControlImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimplext/)
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- [`PageImplExt`](/docs/0.5.0/api/ferroui-controls/page/trait-pageimplext/)
- [`MultiPageImplExt`](/docs/0.5.0/api/ferroui-controls/page/trait-multipageimplext/)
- `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<MultiPage>`](/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/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`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/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- `Drop`
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`PageImpl`](/docs/0.5.0/api/ferroui-controls/page/trait-pageimpl/)
- [`MultiPageImpl`](/docs/0.5.0/api/ferroui-controls/page/trait-multipageimpl/)

## Availability

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