# PageSelectionChangedEventArgs

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

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

```rust
struct PageSelectionChangedEventArgs
```

Provides data for a page selection-changed event.

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

## Members

- [`new`](#function-new)
- [`previous_page`](#function-previous_page)
- [`current_page`](#function-current_page)

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

### new

```rust
fn new<T: ?Sized>(routed_event: Option<&RoutedEvent<T>>, previous_page: Option<Ref<Page>>, current_page: Option<Ref<Page>>) -> Self
```

Initializes a new instance of the `PageSelectionChangedEventArgs`
class.

`routed_event` is the routed event associated with this event args
instance, `previous_page` the page that was selected before the
change (`None` if no page was selected) and `current_page` the page
that is now selected (`None` if the selection was cleared).

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

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

### previous_page

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

Gets the page that was selected before the change.

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

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

### current_page

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

Gets the page that is now selected.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ToOwned`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)
- `Clone`
- `Deref`
- [`IRoutedEventArgs`](/docs/0.5.0/api/ferroui-base/interactivity/trait-iroutedeventargs/)
- `PartialEq`

## Availability

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