# Page

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

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

```rust
struct Page
```

Abstract base class for all page types.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`on_navigated_to`](#function-on_navigated_to)
- [`on_navigating_from`](#function-on_navigating_from)
- [`on_navigated_from`](#function-on_navigated_from)
- [`on_system_back_button_pressed`](#function-on_system_back_button_pressed)
- [`update_content_safe_area_padding`](#function-update_content_safe_area_padding)
- [`update_active_page`](#function-update_active_page)
- [`safe_area_padding_property`](#function-safe_area_padding_property)
- [`header_property`](#function-header_property)
- [`header_template_property`](#function-header_template_property)
- [`icon_property`](#function-icon_property)
- [`icon_template_property`](#function-icon_template_property)
- [`current_page_property`](#function-current_page_property)
- [`is_in_navigation_page_property`](#function-is_in_navigation_page_property)
- [`navigation_property`](#function-navigation_property)
- [`page_navigation_system_back_button_pressed_event`](#function-page_navigation_system_back_button_pressed_event)
- [`construct`](#function-construct)
- [`header`](#function-header)
- [`set_header`](#function-set_header)
- [`header_template`](#function-header_template)
- [`set_header_template`](#function-set_header_template)
- [`icon`](#function-icon)
- [`set_icon`](#function-set_icon)
- [`icon_template`](#function-icon_template)
- [`set_icon_template`](#function-set_icon_template)
- [`safe_area_padding`](#function-safe_area_padding)
- [`set_safe_area_padding`](#function-set_safe_area_padding)
- [`current_page`](#function-current_page)
- [`set_current_page`](#function-set_current_page)
- [`navigation`](#function-navigation)
- [`set_navigation`](#function-set_navigation)
- [`is_in_navigation_page`](#function-is_in_navigation_page)
- [`set_is_in_navigation_page`](#function-set_is_in_navigation_page)
- [`page_navigation_system_back_button_pressed`](#function-page_navigation_system_back_button_pressed)
- [`navigated_to`](#function-navigated_to)
- [`navigating`](#function-navigating)
- [`navigated_from`](#function-navigated_from)

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

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

### to_ref

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

Returns a strong reference to this object.

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

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

### on_navigated_to

```rust
fn on_navigated_to(self: &Self, args: &NavigatedToEventArgs)
```

Called when the page has been navigated to.

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

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

### on_navigating_from

```rust
fn on_navigating_from(self: &Self, args: &NavigatingFromEventArgs)
```

Called when the page is about to be navigated from.

Setting the cancel flag of the args here prevents the
`Navigating` asynchronous handlers from running and aborts the
navigation. This method is called before the `Navigating` event.

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

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

### on_navigated_from

```rust
fn on_navigated_from(self: &Self, args: &NavigatedFromEventArgs)
```

Called when the page has been navigated from.

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

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

### on_system_back_button_pressed

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

Called when the system back button is pressed. Returns true if
the back press was handled.

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

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

### update_content_safe_area_padding

```rust
fn update_content_safe_area_padding(self: &Self)
```

Called when the safe-area padding changes.

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

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

### update_active_page

```rust
fn update_active_page(self: &Self)
```

Called when the active child page changes.

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

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

### safe_area_padding_property

```rust
fn safe_area_padding_property() -> &'static StyledProperty<Thickness>
```

Defines the `SafeAreaPadding` property.

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

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

### header_property

```rust
fn header_property() -> &'static StyledProperty<Option<BoxedValue>>
```

Defines the `Header` property.

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

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

### header_template_property

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

Defines the `HeaderTemplate` property.

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

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

### icon_property

```rust
fn icon_property() -> &'static StyledProperty<Option<BoxedValue>>
```

Defines the `Icon` property.

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

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

### icon_template_property

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

Defines the `IconTemplate` property.

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

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

### current_page_property

```rust
fn current_page_property() -> &'static StyledProperty<Option<Ref<Page>>>
```

Defines the `CurrentPage` property.

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

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

### is_in_navigation_page_property

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

Defines the `IsInNavigationPage` property.

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

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

### navigation_property

```rust
fn navigation_property() -> &'static DirectProperty<Page, Option<Rc<dyn INavigation>>>
```

Defines the `Navigation` property.

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

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

### page_navigation_system_back_button_pressed_event

```rust
fn page_navigation_system_back_button_pressed_event() -> &'static RoutedEvent<RoutedEventArgs>
```

Defines the routed event raised when the system back button is
pressed.

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

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

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

### header

```rust
fn header(self: &Self) -> Option<BoxedValue>
```

The header content displayed in the navigation bar or tab strip.

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

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

### set_header

```rust
fn set_header(self: &Self, value: Option<BoxedValue>)
```



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

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

### header_template

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

The data template used to display the header.

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

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

### set_header_template

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



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

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

### icon

```rust
fn icon(self: &Self) -> Option<BoxedValue>
```

The icon displayed alongside the page header.

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

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

### set_icon

```rust
fn set_icon(self: &Self, value: Option<BoxedValue>)
```



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

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

### icon_template

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

The data template used to display the icon.

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

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

### set_icon_template

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



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

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

### safe_area_padding

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

The safe-area padding applied to this page's content.

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

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

### set_safe_area_padding

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



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

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

### current_page

```rust
fn current_page(self: &Self) -> Option<Ref<Page>>
```

The currently active child page.

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

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

### set_current_page

```rust
fn set_current_page(self: &Self, value: impl Into<Nullable<Page>>)
```



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

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

### navigation

```rust
fn navigation(self: &Self) -> Option<Rc<dyn INavigation>>
```

The navigation service provided by the parent navigation page.

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

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

### set_navigation

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



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

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

### is_in_navigation_page

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

Whether this page is currently hosted inside a navigation page.

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

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

### set_is_in_navigation_page

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



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

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

### page_navigation_system_back_button_pressed

```rust
fn page_navigation_system_back_button_pressed(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
```

Raised when the system back button is pressed while this page is
active.

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

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

### navigated_to

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

Occurs when the page has been navigated to.

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

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

### navigating

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

Occurs when the page is about to be navigated from.

Each subscriber is awaited in turn. Set the cancel flag of the args
to abort the navigation; remaining subscribers are not invoked once
cancellation is requested. If a subscriber panics, the panic
propagates to the task of the calling navigation method (such as the
push of a navigation page) and the navigation is aborted.

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

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

### navigated_from

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

Occurs when the page has been navigated from.

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

## 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/)
- `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<Page>`](/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/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`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/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`PageImpl`](/docs/0.5.0/api/ferroui-controls/page/trait-pageimpl/)
- [`IHeadered`](/docs/0.5.0/api/ferroui-controls/trait-iheadered/)

## Availability

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