Table of Contents

Class SKLottieView

Namespace
SkiaSharp.Extended.UI.Controls
Assembly
SkiaSharp.Extended.UI.dll

A view that plays Lottie animations using the Skottie library.

public class SKLottieView : SKAnimatedSurfaceView, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, ILayout, ILayoutController, IVisualTreeElement, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout
Inheritance
SKLottieView
Implements
Inherited Members

Constructors

SKLottieView()

Initializes a new instance of the SKLottieView class.

Fields

AnimationSpeedProperty

Identifies the AnimationSpeed bindable property.

DurationProperty

Identifies the Duration bindable property.

IsCompleteProperty

Identifies the IsComplete bindable property.

ProgressProperty

Identifies the Progress bindable property.

RepeatCountProperty

Identifies the RepeatCount bindable property.

RepeatModeProperty

Identifies the RepeatMode bindable property.

SourceProperty

Identifies the Source bindable property.

Properties

AnimationSpeed

Gets or sets the animation playback speed multiplier. Default is 1.0 (normal speed). Values greater than 1.0 speed up the animation, values between 0 and 1.0 slow it down. Use 0 to pause the animation. Negative values reverse the playback direction.

Duration

Gets the total duration of the animation.

IsComplete

Gets a value indicating whether the animation has completed all repeats.

Progress

Gets or sets the current playback progress of the animation.

RepeatCount

Gets or sets the number of times to repeat the animation. Use -1 for infinite.

RepeatMode

Gets or sets the repeat mode for the animation.

Source

Gets or sets the Lottie animation image source.

Methods

OnPaintSurface(SKCanvas, SKSize)

Called when the surface needs to be painted.

Update(TimeSpan)

Called to update the animation state for the given elapsed time.

Events

AnimationCompleted

Occurs when the animation has completed playback.

AnimationFailed

Occurs when the animation fails to load.

AnimationLoaded

Occurs when the animation has been successfully loaded.