# Animation

Namespace: **Wisej.Web**

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

* [Component](https://docs.wisej.com/api/wisej.base/general/wisej.base.component)
  * [Component](https://docs.wisej.com/api/wisej.web/general/wisej.web.component)
    * [Animation](https://docs.wisej.com/api/wisej.web/extenders/animation)

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Animation()

Initializes a new instance of the [Animation](https://docs.wisej.com/api/wisej.web/extenders/animation) class.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Animation(container)

Initializes a new instance of the [Animation](https://docs.wisej.com/api/wisej.web/extenders/animation) 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](https://docs.wisej.com/api/wisej.web/extenders/animation) extender. |

## Properties

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) CustomAnimations

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) 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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) 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.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Clear()

Removes all animations.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) Dispose(disposing)

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) GetAnimation(control)

Animation properties.

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

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

**Throws:**

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) OnEnd(e)

Fires the [End](#end) event.

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) OnStart(e)

Fires the [Start](#start) event.

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebEvent(e)

Processes the event from the client.

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebRender(config)

Renders the client component.

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ResetAnimation(control)

Removes all the animation properties from the *control* .

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Run(control)

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

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

## Events

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) End

[AnimationEventHandler](https://docs.wisej.com/api/wisej.web/extenders/animation/wisej.web.animationeventhandler) Fired when the animation ends.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Start

[AnimationEventHandler](https://docs.wisej.com/api/wisej.web/extenders/animation/wisej.web.animationeventhandler) Fired when the animation begins.

## Implements

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