# SlidingAnimation

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

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

```rust
struct SlidingAnimation
```

Slides an element into its place when it is loaded, from outside one of its edges.

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

## Members

- [`set_left`](#function-set_left)
- [`set_right`](#function-set_right)
- [`set_top`](#function-set_top)
- [`set_bottom`](#function-set_bottom)

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

### set_left

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

Slides the element in from its width to the left, over `milliseconds`, when it is loaded.

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

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

### set_right

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

Slides the element in from twice its width to the right, over `milliseconds`, when it is
loaded.

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

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

### set_top

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

Slides the element in from its height above, over `milliseconds`, when it is loaded.

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

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

### set_bottom

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

Slides the element in from twice its height below, over `milliseconds`, when it is
loaded.

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

## 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/).
