# VisualStateGroup

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-designer-animation/struct-visualstategroup/

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

```rust
struct VisualStateGroup
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/states.rs#L36)

## Members

- [`name`](#struct_field-name)
- [`owner`](#struct_field-owner)
- [`states`](#struct_field-states)
- [`transitions`](#struct_field-transitions)
- [`validate`](#function-validate)
- [`class_name`](#function-class_name)
- [`transition_class`](#function-transition_class)
- [`classes`](#function-classes)
- [`actions`](#function-actions)
- [`to_xaml`](#function-to_xaml)
- [`read`](#function-read)
- [`plan`](#function-plan)
- [`remove`](#function-remove)

<a id="struct_field-name"></a>

### name

```rust
name: String
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/states.rs#L37)

<a id="struct_field-owner"></a>

### owner

```rust
owner: ferroui_designer_core::NodeId
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/states.rs#L38)

<a id="struct_field-states"></a>

### states

```rust
states: Vec<VisualState>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/states.rs#L39)

<a id="struct_field-transitions"></a>

### transitions

```rust
transitions: Vec<StateTransition>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/states.rs#L40)

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

### validate

```rust
fn validate(self: &Self) -> Result<()>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/states.rs#L43)

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

### class_name

```rust
fn class_name(self: &Self, state: &str) -> String
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/states.rs#L99)

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

### transition_class

```rust
fn transition_class(self: &Self, from: &str, to: &str) -> String
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/states.rs#L102)

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

### classes

```rust
fn classes(self: &Self) -> Vec<String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/states.rs#L110)

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

### actions

```rust
fn actions(self: &Self, owner_name: &str, to: &str, from: Option<&str>) -> Result<Vec<BehaviorAction>>
```

Emit ordinary class actions, routing directional transitions through ConditionalAction.
The group's generated styles set each route condition from the current state class,
so a single event action chooses the edge that is active when the event actually fires.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/states.rs#L125)

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

### to_xaml

```rust
fn to_xaml(self: &Self, owner_name: &str) -> Result<String>
```

Native nested styles own their class scope. Literal state properties also use an
animation layer so an authored local Width/Opacity does not mask the selected state.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/states.rs#L217)

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

### read

```rust
fn read(document: &Document) -> Vec<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/states.rs#L400)

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

### plan

```rust
fn plan(self: &Self, document: &Document) -> Result<Vec<Edit>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/states.rs#L504)

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

### remove

```rust
fn remove(document: &Document, owner: NodeId, name: &str) -> Result<Vec<Edit>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/states.rs#L645)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `DeserializeOwned`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Serialize`
- `Deserialize<'de>`

## Availability

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