# IPageTransition

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/animation/trait-ipagetransition/

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

```rust
trait IPageTransition: 'static
```

Interface for animations that transition between two pages.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_page_transition.rs#L8)

## Members

- [`start`](#function-start)
- [`as_progress_page_transition`](#function-as_progress_page_transition)
- [`as_page_slide`](#function-as_page_slide)
- [`as_composite_page_transition`](#function-as_composite_page_transition)

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

### start

```rust
fn start(self: &Self, from: Option<&Ref<Visual>>, to: Option<&Ref<Visual>>, forward: bool, cancellation_token: CancellationToken) -> JoinHandle<()>
```

Starts the animation.

`from` is the control that is being transitioned away from, if any,
and `to` the control that is being transitioned to, if any. `forward`
tells whether the transition goes forwards or backwards. The
transition stops as it is when `cancellation_token` is cancelled.

The result tracks the progress of the animation: the handle of a task
of the dispatcher that ends with `Ok(())` when the transition has
ended or was cancelled, and with `JoinError::Panicked` when an
animation of the transition could not be run (the failure is a value
of the handle, which the caller handles).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_page_transition.rs#L21)

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

### as_progress_page_transition

```rust
fn as_progress_page_transition(self: &Self) -> Option<&dyn crate::animation::IProgressPageTransition>
```

The transition as a progress-driven transition, if it is one.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_page_transition.rs#L30)

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

### as_page_slide

```rust
fn as_page_slide(self: &Self) -> Option<&crate::animation::PageSlide>
```

The transition as a page slide, if it is one.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_page_transition.rs#L35)

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

### as_composite_page_transition

```rust
fn as_composite_page_transition(self: &Self) -> Option<&crate::animation::CompositePageTransition>
```

The transition as a composite page transition, if it is one.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_page_transition.rs#L40)

## Trait implementations

- [`IPageTransition`](/docs/0.5.0/api/ferroui-base/animation/trait-ipagetransition/)

## Availability

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