# Animation

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

* [Component](/api/wisej.base/general/wisej.base.component.md)
  * [Component](/api/wisej.web/general/wisej.web.component.md)
    * [Animation](/api/wisej.web/extenders/animation.md)

Provides support for animating controls or windows using predefined animations definitions or custom animations in response to certain events.

{% tabs %}
{% tab title="C#" %}

```csharp
public class Animation : Component, IExtenderProvider
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class Animation
    Inherits Component
    Implements IExtenderProvider
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/hsR4ok3152WyAf8J2C1u) Animation()

Initializes a new instance of the [Animation](/api/wisej.web/extenders/animation.md) class.

### ![](/files/hsR4ok3152WyAf8J2C1u) Animation(container)

Initializes a new instance of the [Animation](/api/wisej.web/extenders/animation.md) class attached to a [IContainer](https://docs.microsoft.com/dotnet/api/system.componentmodel.icontainer) implementation.

| Name          | Type                                                                                 | Description                                                                                                                                                                               |
| ------------- | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **container** | [IContainer](https://docs.microsoft.com/dotnet/api/system.componentmodel.icontainer) | An [IContainer](https://docs.microsoft.com/dotnet/api/system.componentmodel.icontainer) that represents the container of the [Animation](/api/wisej.web/extenders/animation.md) extender. |

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) CustomAnimations

[List\<String>](https://docs.microsoft.com/dotnet/api/system.collections.generic.list-1): Manages a collection of used defined animation definitions.

### ![](/files/hsR4ok3152WyAf8J2C1u) Tag

[Object](https://docs.microsoft.com/dotnet/api/system.object): Returns or sets the object that contains programmer-supplied data associated with this component. (Default: `null`)

## Methods

### ![](/files/hsR4ok3152WyAf8J2C1u) CanExtend(extendee)

Returns a value indicating whether a control can be extended.

| Parameter    | Type                                                          | Description                 |
| ------------ | ------------------------------------------------------------- | --------------------------- |
| **extendee** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | The control to be extended. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). true if the control can be extended; otherwise, false.

### ![](/files/hsR4ok3152WyAf8J2C1u) Clear()

Removes all animations.

### ![](/files/lzopMboA31bVq8UIcbT3) Dispose(disposing)

| Parameter     | Type                                                            | Description |
| ------------- | --------------------------------------------------------------- | ----------- |
| **disposing** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) |             |

### ![](/files/hsR4ok3152WyAf8J2C1u) GetAnimation(control)

Animation properties.

| Parameter   | Type                                         | Description                                |
| ----------- | -------------------------------------------- | ------------------------------------------ |
| **control** | [Control](/api/wisej.web/general/control.md) | The control to get the animation name for. |

**Returns:** [Properties](/api/wisej.web/extenders/animation/wisej.web.animation.properties.md). The name of the selected animation.

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception) *control* is null.

### ![](/files/hsR4ok3152WyAf8J2C1u) OnEnd(e)

Fires the [End](#end) event.

| Parameter | Type                                                                                     | Description |
| --------- | ---------------------------------------------------------------------------------------- | ----------- |
| **e**     | [AnimationEventArgs](/api/wisej.web/extenders/animation/wisej.web.animationeventargs.md) |             |

### ![](/files/hsR4ok3152WyAf8J2C1u) OnStart(e)

Fires the [Start](#start) event.

| Parameter | Type                                                                                     | Description |
| --------- | ---------------------------------------------------------------------------------------- | ----------- |
| **e**     | [AnimationEventArgs](/api/wisej.web/extenders/animation/wisej.web.animationeventargs.md) |             |

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebEvent(e)

Processes the event from the client.

| Parameter | Type                                                        | Description      |
| --------- | ----------------------------------------------------------- | ---------------- |
| **e**     | [WisejEventArgs](/api/wisej.core/general/wisejeventargs.md) | Event arguments. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebRender(config)

Renders the client component.

| Parameter  | Type                                                          | Description                   |
| ---------- | ------------------------------------------------------------- | ----------------------------- |
| **config** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic configuration object. |

### ![](/files/hsR4ok3152WyAf8J2C1u) ResetAnimation(control)

Removes all the animation properties from the *control* .

| Parameter   | Type                                         | Description                                                                             |
| ----------- | -------------------------------------------- | --------------------------------------------------------------------------------------- |
| **control** | [Control](/api/wisej.web/general/control.md) | Control to remove from the [Animation](/api/wisej.web/extenders/animation.md) extender. |

### ![](/files/hsR4ok3152WyAf8J2C1u) Run(control)

Runs the animation of the specified [Control](/api/wisej.web/general/control.md) immediately. If the control doesn't have a configured animation this method doesn't do anything.

| Parameter   | Type                                         | Description             |
| ----------- | -------------------------------------------- | ----------------------- |
| **control** | [Control](/api/wisej.web/general/control.md) | The control to animate. |

## Events

### ![](/files/hsR4ok3152WyAf8J2C1u) End

[AnimationEventHandler](/api/wisej.web/extenders/animation/wisej.web.animationeventhandler.md) Fired when the animation ends.

### ![](/files/hsR4ok3152WyAf8J2C1u) Start

[AnimationEventHandler](/api/wisej.web/extenders/animation/wisej.web.animationeventhandler.md) Fired when the animation begins.

## Implements

| Name                                                                              | Description                                                                                                     |
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| [IUserData](/api/wisej.web/interfaces/wisej.web.iuserdata.md)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface. |
| [IWisejComponent](/api/wisej.core/interfaces/wisej.core.iwisejcomponent.md)       | All wisej components implement this interface.                                                                  |
| [IWisejSerializable](/api/wisej.core/interfaces/wisej.core.iwisejserializable.md) | Allows an object to serialize itself.                                                                           |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/extenders/animation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
