Table of Contents

Class AnimationPlayer

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

This is a static control which displays an animation. This control is useful to display a (small) animation while doing a long task (e.g. a "throbber").

[ControlCategory("Other")]
public class AnimationPlayer : Control, IBaseObject, IDisposableObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, INotifyDataErrorInfo
Inheritance
AnimationPlayer
Implements

Examples

Here is how to declare a AnimationPlayer:

AnimationPlayer result = new();

result.Parent = mainPanel;
result.LoadFromUrl(AnimationHourGlass, AnimationType.Gif);
result.Play();

return result;

Remarks

AnimationPlayer

Constructors

AnimationPlayer()

Initializes a new instance of the AnimationPlayer class.

Fields

CreateHandlerOverride

Gets or sets function which creates animation player driver used in the AnimationPlayer.

DefaultHandlerKind

Gets or sets type of the default driver used inside the AnimationPlayer.

Properties

AnimationSize

Gets the size of the animation in pixels.

FrameCount

Gets the number of frames for this animation.

Handler

Gets control handler.

IsOk

Returns true if animation data is present.

Methods

CreateHandler()

Creates a handler for the control.

GetDelay(uint)

Gets the delay (in milliseconds) for the specified frame.

GetFrame(uint)

Returns the specified frame as a GenericImage.

GetPreferredSize(SizeD)

Retrieves the size of a rectangular area into which a control can be fitted, in device-independent units.

IsPlaying()

Gets whether animation is being played.

Load(Stream, AnimationType)

Loads the animation from the given stream.

LoadFile(string, AnimationType)

Loads an animation from a file.

LoadFromUrl(string, AnimationType)

Loads the animation from the given file or resource url.

Play()

Starts playing the animation.

SetInactiveBitmap(ImageSet?)

Sets the bitmap to show on the control when it's not playing an animation.

Stop()

Stops playing the animation.