AnimatedVisualPlayer.PlayAsync(Double, Double, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Starts playing the loaded animated visual, or does nothing if no animated visual is loaded.
This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).
public:
virtual IAsyncAction ^ PlayAsync(double fromProgress, double toProgress, bool looped) = PlayAsync;
IAsyncAction PlayAsync(double const& fromProgress, double const& toProgress, bool const& looped);
public IAsyncAction PlayAsync(double fromProgress, double toProgress, bool looped);
Public Function PlayAsync (fromProgress As Double, toProgress As Double, looped As Boolean) As IAsyncAction
Parameters
- fromProgress
-
Double
double
The point from which to start the animation, as a value from 0 to 1.
- toProgress
-
Double
double
The point at which to finish the animation, as a value from 0 to 1.
- looped
-
Boolean
bool
If true, the animation loops continuously between fromProgress and toProgress. If false, the animation plays once then stops.
Returns
An async action that is completed when the play is stopped or, if looped is not set, when the play reaches toProgress.
Remarks
If toProgress is less than fromProgress, the animated visual will play from fromProgress to the end, then play from the beginning until it reaches toProgress. To play an animated visual in reverse, set the playback rate to a negative value.