Table of Contents

Method LoadFromUrl

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

LoadFromUrl(string, AnimationType)

Loads the animation from the given file or resource url.

public virtual bool LoadFromUrl(string url, AnimationType type = AnimationType.Any)

Parameters

url string

Url with the animation.

type AnimationType

One of the AnimationType values; Any means that the function should try to autodetect the animation type.

Returns

bool

true if the operation succeeded, false otherwise.

Examples

var resPrefix = $"embres:ControlsSample.Resources.Animation.";
var animationPlant = $"{resPrefix}Plant.gif";
animation.LoadFromUrl(animationPlant);
animation.Play();