AnimationSet Class
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.
A collection of animations that can be grouped together. This type represents a composite animation (such as Windows.UI.Xaml.Media.Animation.Storyboard) that can be executed on a given element.
public class AnimationSet : IDisposable
public sealed class AnimationSet : Windows.UI.Xaml.DependencyObjectCollection
type AnimationSet = class
interface IDisposable
type AnimationSet = class
inherit DependencyObjectCollection
Public Class AnimationSet
Implements IDisposable
Public NotInheritable Class AnimationSet
Inherits DependencyObjectCollection
- Inheritance
-
AnimationSet
- Inheritance
-
Windows.UI.Xaml.DependencyObjectCollectionAnimationSet
- Implements
Constructors
AnimationSet() | |
AnimationSet(UIElement) |
Initializes a new instance of the AnimationSet class. |
Properties
Element |
Gets the Windows.UI.Xaml.UIElement |
IsSequential |
Gets or sets a value indicating whether top level animation nodes in this collection are invoked
sequentially. This applies to both AnimationScope nodes (which will still trigger
contained animations at the same time), and other top level animation nodes. The default value
is Note that this property will also cause a change in behavior for the animation. With the default configuration, with all animations starting at the same time, it's not possible to use multiple animations targeting the same property (as they'll cause a conflict and be ignored when on the composition layer, or cause a crash when on the XAML layer). When animations are started sequentially instead, each sequential block will be able to share target properties with animations from other sequential blocks, without issues. Note that especially for simple scenarios (eg. an opacity animation that just transitions to a state and then back, or between two states), it is recommended to use a single keyframe animation instead, which will result in less overhead when creating and starting the animation. |
State |
Gets the current state of the AnimationSet |
UseComposition |
Gets or sets a value indicating whether composition must be use even on SDK > 10586 |
Visual |
Gets the Visual object that backs the XAML element |
Methods
AddCompositionAnimation(String, CompositionAnimation) |
Adds a composition animation to be run on StartAsync() |
AddCompositionDirectPropertyChange(String, Object) |
Adds a composition property that will change instantaneously |
AddCompositionEffectAnimation(CompositionObject, CompositionAnimation, String) |
Adds a composition effect animation to be run on backing Visual |
AddStoryboardAnimation(String, Timeline) |
Adds a storyboard animation to be run |
Dispose() |
Dispose resources. |
RemoveCompositionAnimation(String) |
Removes a composition animation from being run on Visual property |
RemoveCompositionDirectPropertyChange(String) |
Removes a composition property change |
SetDelay(Double) |
Overwrites the delay time on all animations after last Then() to the specified value |
SetDelay(TimeSpan) |
Overwrites the delay time on all animations after last Then() to the specified value |
SetDelayForAll(Double) |
Overwrites the delay time on all animations to the specified value |
SetDelayForAll(TimeSpan) |
Overwrites the delay time on all animations to the specified value |
SetDuration(Double) |
Overwrites the duration on all animations after last Then() to the specified value |
SetDuration(TimeSpan) |
Overwrites the duration on all animations after last Then() to the specified value |
SetDurationForAll(Double) |
Overwrites the duration on all animations to the specified value |
SetDurationForAll(TimeSpan) |
Overwrites the duration on all animations to the specified value |
Start() |
Stats all animations. This method is not awaitable. |
Start(CancellationToken) | |
Start(UIElement) |
Starts the animations present in the current AnimationBuilder instance. |
StartAsync() |
Starts all animations and returns an awaitable task. |
StartAsync(CancellationToken) | |
StartAsync(UIElement) |
Starts the animations present in the current AnimationBuilder instance. |
StartAsync(UIElement, CancellationToken) |
Starts the animations present in the current AnimationBuilder instance. |
Stop() |
Cancels the current animation on the attached Windows.UI.Xaml.UIElement instance. |
Stop(UIElement) |
Cancels the current animation for a target Windows.UI.Xaml.UIElement instance. |
Then() |
Wait for existing animations to complete before running new animations |
Events
Completed |
Raised whenever the current animation completes. |
Started |
Raised whenever the current animation is started. |
Extension Methods
Blur(AnimationSet, Double, Double, Double, EasingType, EasingMode) |
Animates the gaussian blur of the UIElement. |
Fade(AnimationSet, Single, Double, Double, EasingType, EasingMode) |
Animates the opacity of the UIElement. |
Light(AnimationSet, Double, Double, Double, Nullable<Color>, EasingType, EasingMode) |
Obsolete.
Animates a point light and it's distance. |
Offset(AnimationSet, Single, Single, Double, Double, EasingType, EasingMode) |
Animates the offset of the UIElement. |
Rotate(AnimationSet, Single, Single, Single, Double, Double, EasingType, EasingMode) |
Animates the rotation in degrees of the UIElement. |
Saturation(AnimationSet, Double, Double, Double, EasingType, EasingMode) |
Saturates the visual within the animation set. |
Scale(AnimationSet, Single, Single, Single, Single, Double, Double, EasingType, EasingMode) |
Animates the scale of the specified UIElement. |