AnimatedVisualPlayer AnimatedVisualPlayer AnimatedVisualPlayer AnimatedVisualPlayer Class

Definition

An element that displays and controls an IAnimatedVisual.

public : class AnimatedVisualPlayer : FrameworkElement
struct winrt::Microsoft::UI::Xaml::Controls::AnimatedVisualPlayer : FrameworkElement
public class AnimatedVisualPlayer : FrameworkElement
Public Class AnimatedVisualPlayer Inherits FrameworkElement
Attributes

Examples

Tip

For more info, design guidance, and code examples, see Sound.

If you have the XAML Controls Gallery app installed, click here to open the app and see the AnimatedVisualPlayer in action.

Remarks

The AnimatedVisualPlayer hosts and controls playback of an animated Visual tree, integrating custom motion graphic content with XAML UI. For instance, the AnimatedVisualPlayer is used to display and control Lottie animations.

Constructors

AnimatedVisualPlayer() AnimatedVisualPlayer() AnimatedVisualPlayer() AnimatedVisualPlayer()

Initializes a new instance of the AnimatedVisualPlayer class.

Properties

AutoPlay AutoPlay AutoPlay AutoPlay

Gets or sets a value that indicates whether an animated visual plays immediately when it is loaded.

AutoPlayProperty AutoPlayProperty AutoPlayProperty AutoPlayProperty

Identifies the AutoPlay dependency property.

Diagnostics Diagnostics Diagnostics Diagnostics

Gets optional diagnostics information about the last attempt to load an animated visual.

DiagnosticsProperty DiagnosticsProperty DiagnosticsProperty DiagnosticsProperty

Identifies the Diagnostics dependency property.

Duration Duration Duration Duration

Gets the duration of the the currently loaded animated visual, or TimeSpan.Zero if no animated visual is loaded.

DurationProperty DurationProperty DurationProperty DurationProperty

Identifies the Duration dependency property.

FallbackContent FallbackContent FallbackContent FallbackContent

Gets or sets content to display if an animated visual fails to load.

FallbackContentProperty FallbackContentProperty FallbackContentProperty FallbackContentProperty

Identifies the FallbackContent dependency property.

IsAnimatedVisualLoaded IsAnimatedVisualLoaded IsAnimatedVisualLoaded IsAnimatedVisualLoaded

Gets a value that indicates whether an animated visual is loaded.

IsAnimatedVisualLoadedProperty IsAnimatedVisualLoadedProperty IsAnimatedVisualLoadedProperty IsAnimatedVisualLoadedProperty

Identifies the IsAnimatedVisualLoaded dependency property.

IsPlaying IsPlaying IsPlaying IsPlaying

Gets a value that indicates whether an animated visual is loaded and a play is underway.

IsPlayingProperty IsPlayingProperty IsPlayingProperty IsPlayingProperty

Identifies the IsPlaying dependency property.

PlaybackRate PlaybackRate PlaybackRate PlaybackRate

Gets or sets the rate at which the animation plays.

PlaybackRateProperty PlaybackRateProperty PlaybackRateProperty PlaybackRateProperty

Identifies the PlaybackRate dependency property.

ProgressObject ProgressObject ProgressObject ProgressObject

Gets a CompositionObject that is animated along with the progress of the AnimatedVisualPlayer.

Source Source Source Source

Gets or sets the provider of the animated visual for the player.

SourceProperty SourceProperty SourceProperty SourceProperty

Identifies the Source dependency property.

Stretch Stretch Stretch Stretch

Gets or sets a value that describes how an animated visual should be stretched to fill the destination rectangle.

StretchProperty StretchProperty StretchProperty StretchProperty

Identifies the Stretch dependency property.

Methods

Pause() Pause() Pause() Pause()

Pauses the currently playing animated visual, or does nothing if no play is underway.

PlayAsync(Double, Double, Boolean) PlayAsync(Double, Double, Boolean) PlayAsync(Double, Double, Boolean) PlayAsync(Double, Double, Boolean)

Starts playing the loaded animated visual, or does nothing if no animated visual is loaded.

Resume() Resume() Resume() Resume()

Resumes the currently paused animated visual, or does nothing if there is no animated visual loaded or the animated visual is not paused.

SetProgress(Double) SetProgress(Double) SetProgress(Double) SetProgress(Double)

Moves the progress of the animated visual to the given value, or does nothing if no animated visual is loaded.

Stop() Stop() Stop() Stop()

Stops the current play, or does nothing if no play is underway.

Applies to

See also