# VisualStateChangedEventArgs

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

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

```rust
struct VisualStateChangedEventArgs
```

The arguments of `CurrentStateChanging` and `CurrentStateChanged` of a
`VisualStateGroup`.

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

## Members

- [`new`](#function-new)
- [`old_state`](#function-old_state)
- [`new_state`](#function-new_state)
- [`control`](#function-control)

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

### new

```rust
fn new(old_state: Option<Ref<VisualState>>, new_state: Option<Ref<VisualState>>, control: Option<Ref<Control>>) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/visual_state/visual_state_changed_event_args.rs#L19)

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

### old_state

```rust
fn old_state(self: &Self) -> Option<Ref<VisualState>>
```

The state the group leaves (`None` for no state).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/visual_state/visual_state_changed_event_args.rs#L28)

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

### new_state

```rust
fn new_state(self: &Self) -> Option<Ref<VisualState>>
```

The state the group enters (`None` for no state).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/visual_state/visual_state_changed_event_args.rs#L33)

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

### control

```rust
fn control(self: &Self) -> Option<Ref<Control>>
```

The control whose states change.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/visual_state/visual_state_changed_event_args.rs#L38)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Debug`
- `Default`

## Availability

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