# ITransition

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/animation/trait-itransition/

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

```rust
trait ITransition: 'static
```

Interface for transition objects: animates a property from its old value
to its new value whenever the value changes.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_transition.rs#L8)

## Members

- [`apply`](#function-apply)
- [`property`](#function-property)
- [`set_property`](#function-set_property)
- [`debug_display`](#function-debug_display)
- [`as_object`](#function-as_object)

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

### apply

```rust
fn apply(self: &Self, control: &Animatable, clock: Rc<dyn IClock>, old_value: &BoxedValue, new_value: &BoxedValue) -> Rc<dyn IDisposable>
```

Applies the transition to the specified control: animates the
transition's property from `old_value` to `new_value`, which hold
exactly the value type of the property. Disposing the result ends the
transition.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_transition.rs#L13)

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

### property

```rust
fn property(self: &Self) -> &'static FerroProperty
```

The property to be animated. Panics when the transition has none.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_transition.rs#L22)

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

### set_property

```rust
fn set_property(self: &Self, value: &'static FerroProperty)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_transition.rs#L24)

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

### debug_display

```rust
fn debug_display(self: &Self) -> String
```

A description of the transition for diagnostics.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_transition.rs#L27)

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

### as_object

```rust
fn as_object(self: &Self) -> Option<crate::Ref<crate::FerroObject>>
```

The object of the object model that implements the contract, if one
does: the equivalent of `is`/`as` on the interface. Cast the object to
the class looked for (`as_object()?.cast::<T>()`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_transition.rs#L41)

## Availability

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