AnimationDescription Class

Definition

Exposes a collection of individual animation effects that are performed on a specific target to make up a complete Windows opacity, scaling, or translation animation.

public ref class AnimationDescription sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Core.AnimationMetrics.IAnimationDescriptionFactory, 65536, Windows.UI.Core.AnimationMetrics.AnimationMetricsContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.UI.Core.AnimationMetrics.AnimationMetricsContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class AnimationDescription final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.UI.Core.AnimationMetrics.AnimationMetricsContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Core.AnimationMetrics.IAnimationDescriptionFactory, 65536, "Windows.UI.Core.AnimationMetrics.AnimationMetricsContract")]
class AnimationDescription final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Core.AnimationMetrics.IAnimationDescriptionFactory), 65536, typeof(Windows.UI.Core.AnimationMetrics.AnimationMetricsContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.UI.Core.AnimationMetrics.AnimationMetricsContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class AnimationDescription
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.UI.Core.AnimationMetrics.AnimationMetricsContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Core.AnimationMetrics.IAnimationDescriptionFactory), 65536, "Windows.UI.Core.AnimationMetrics.AnimationMetricsContract")]
public sealed class AnimationDescription
function AnimationDescription(effect, target)
Public NotInheritable Class AnimationDescription
Inheritance
Object Platform::Object IInspectable AnimationDescription
Attributes

Windows requirements

Device family
Windows Desktop Extension SDK (introduced in 10.0.10240.0)
API contract
Windows.UI.Core.AnimationMetrics.AnimationMetricsContract (introduced in v1.0)

Examples

This example shows the creation of an AnimationDescription object and its use. The effect and target parameters are assumed to have been previously assigned.

using Windows.UI.Core.AnimationMetrics;

AnimationDescription animationDescription = new AnimationDescription(effect, target);

TimeSpan sd = animationDescription.StaggerDelay;
float tsf = animationDescription.StaggerDelayFactor;
TimeSpan dl = animationDescription.DelayLimit;
int zo = animationDescription.ZOrder;

foreach (var animation in animationDescription.Animations)
{
    switch (animation.Type)
    {
        case PropertyAnimationType.Scale:
            {
                ScaleAnimation scale = animation as ScaleAnimation;
                // Retrieve scale animation metrics.
            }
            break;
        case PropertyAnimationType.Translation:
            {
                TranslationAnimation scale = animation as TranslationAnimation;
                // Retrieve translation animation metrics.
            }
            break;
        case PropertyAnimationType.Opacity:
            {
                OpacityAnimation opacity = animation as OpacityAnimation;
                // Retrieve opacity animation metrics.
            }
            break;
    }

    TimeSpan delay = animation.Delay;
    TimeSpan duration = animation.Duration;
    Point c1 = animation.Control1;
    Point c2 = animation.Control2;
}

Constructors

AnimationDescription(AnimationEffect, AnimationEffectTarget)

Creates an AnimationDescription object with a specific animation and target.

Properties

Animations

Gets the collection of animations that are associated with the AnimationDescription object.

DelayLimit

Gets the maximum cumulative delay time for the animation to be applied to the collection of objects in a target.

StaggerDelay

Gets the amount of time between the application of the animation effect to each object in a target that contains multiple objects. The StaggerDelay, together with the StaggerDelayFactor and DelayLimit, is one of the three elements used to control the relative timing of the animation effects.

StaggerDelayFactor

Gets a multiplier that is applied to each occurrence of the stagger delay, increasing or decreasing the previous delay instance by that amount.

ZOrder

Gets the z-order position of an AnimationDescription object relative to other AnimationDescription objects in the same animation effect.   AnimationDescription objects with a higher z-order cover transitions with a lower z-order.

Applies to

See also