# ScaleAnimation

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-behaviors-animations/struct-scaleanimation/

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

```rust
struct ScaleAnimation
```

Provides scale animation helpers using composition animations.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/scale_animation.rs#L11)

## Members

- [`set_scale_in`](#function-set_scale_in)
- [`set_scale_out`](#function-set_scale_out)
- [`set_zoom_in`](#function-set_zoom_in)
- [`set_zoom_out`](#function-set_zoom_out)
- [`set_bounce`](#function-set_bounce)
- [`set_custom_scale`](#function-set_custom_scale)

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

### set_scale_in

```rust
fn set_scale_in(element: &Control, milliseconds: f64)
```

Applies a scale-in animation to the element when loaded (from 0 to 1), over
`milliseconds`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/scale_animation.rs#L16)

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

### set_scale_out

```rust
fn set_scale_out(element: &Control, milliseconds: f64)
```

Applies a scale-out animation to the element when loaded (from 1 to 0), over
`milliseconds`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/scale_animation.rs#L26)

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

### set_zoom_in

```rust
fn set_zoom_in(element: &Control, milliseconds: f64)
```

Applies a zoom-in animation to the element when loaded (from 1.5 to 1), over
`milliseconds`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/scale_animation.rs#L36)

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

### set_zoom_out

```rust
fn set_zoom_out(element: &Control, milliseconds: f64)
```

Applies a zoom-out animation to the element when loaded (from 1 to 1.5), over
`milliseconds`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/scale_animation.rs#L46)

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

### set_bounce

```rust
fn set_bounce(element: &Control, milliseconds: f64)
```

Applies a bounce animation to the element when loaded, over `milliseconds`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/scale_animation.rs#L55)

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

### set_custom_scale

```rust
fn set_custom_scale(element: &Control, from_scale_x: f64, from_scale_y: f64, to_scale_x: f64, to_scale_y: f64, milliseconds: f64)
```

Applies a custom scale animation to the element when loaded: from (`from_scale_x`,
`from_scale_y`) to (`to_scale_x`, `to_scale_y`), over `milliseconds`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/scale_animation.rs#L65)

## Trait implementations

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

## Availability

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