Table of Contents

Class SkiaGif

Namespace
DrawnUi.Controls
Assembly
DrawnUi.Maui.dll
public class SkiaGif : AnimatedFramesRenderer, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IVisualElementController, IElementController, IView, ITransform, IElement, IVisualTreeElement, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISkiaGestureListener, IHasAfterEffects, ISkiaControl, IDrawnBase, ICanBeUpdatedWithContext, ICanBeUpdated, ISkiaDisposable, IDisposable
Inheritance
SkiaGif
Implements
Inherited Members
Extension Methods

Constructors

SkiaGif()

For standalone use

public SkiaGif()

SkiaGif(SkiaImage)

For building custom controls

public SkiaGif(SkiaImage display)

Parameters

display SkiaImage

Fields

AspectProperty

public static readonly BindableProperty AspectProperty

Field Value

BindableProperty

SourceProperty

public static readonly BindableProperty SourceProperty

Field Value

BindableProperty

_animation

public GifAnimation _animation

Field Value

GifAnimation

Properties

Animation

public GifAnimation Animation { get; set; }

Property Value

GifAnimation

Aspect

public TransformAspect Aspect { get; set; }

Property Value

TransformAspect

Display

public SkiaImage Display { get; protected set; }

Property Value

SkiaImage

Source

public string Source { get; set; }

Property Value

string

Methods

ApplyAspect()

protected void ApplyAspect()

ApplySpeed()

protected override void ApplySpeed()

GetAnimatorParent()

protected override SkiaControl GetAnimatorParent()

Returns

SkiaControl

InvalidateMeasure()

Marks the current measure of an element as invalidated.

protected override void InvalidateMeasure()

LayoutDisplay()

protected virtual void LayoutDisplay()

LoadSource(string)

This is not replacing current animation, only pre-loading! Use SetAnimation after that if needed.

public Task<GifAnimation> LoadSource(string fileName)

Parameters

fileName string

Returns

Task<GifAnimation>

OnAnimatorInitializing()

protected override void OnAnimatorInitializing()

OnAnimatorSeeking(double)

called by Seek

protected override void OnAnimatorSeeking(double time)

Parameters

time double

OnAnimatorUpdated(double)

invoked by internal animator

protected override void OnAnimatorUpdated(double value)

Parameters

value double

ReloadSource()

public virtual void ReloadSource()

RenderFrame(DrawingContext)

protected override void RenderFrame(DrawingContext ctx)

Parameters

ctx DrawingContext

SetAnimation(GifAnimation, bool)

public void SetAnimation(GifAnimation animation, bool disposePrevious)

Parameters

animation GifAnimation
disposePrevious bool

Start(int)

public override void Start(int delayMs = 0)

Parameters

delayMs int

Events

Error

Happens when loaded with error from Source. Will pass exception.

public event EventHandler<Exception> Error

Event Type

EventHandler<Exception>

Success

Happens when loaded fine from Source. Will pass source as string.

public event EventHandler<string> Success

Event Type

EventHandler<string>