Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AnimationDescription class

Applies to Windows only

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.

Syntax


public sealed class AnimationDescription

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Version(0x06020000)]

Members

The AnimationDescription class has these types of members:

Constructors

The AnimationDescription class has these constructors.

ConstructorDescription
AnimationDescription Creates an AnimationDescription object with a specific animation and target.

 

Methods

The AnimationDescription class inherits methods from the Object class (C#/VB/C++).

Properties

The AnimationDescription class has these properties.

PropertyAccess typeDescription

Animations

Read-onlyGets the collection of animations that are associated with the AnimationDescription object.

DelayLimit

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

StaggerDelay

Read-onlyGets 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

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

ZOrder

Read-onlyGets the z-order position of an AnimationDescription object relative to other AnimationDescription objects in the same animation effect.

 

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.



var animationDescription = new Windows.UI.Core.AnimationMetrics.AnimationDescription(effect, target);

var StaggerDelay = animationDescription.staggerDelay;
var StaggerDelayFactor = animationDescription.staggerDelayFactor;
var DelayLimit = animationDescription.delayLimit;
var ZOrder = animationDescription.zorder;

var animations = animationDescription.animations;
for (var i = 0; i < animations.size; i++) {
    var animation = animations[i];

    switch (animation.type) {
        case animationMetrics.PropertyAnimationType.scale:
            // Retrieve scale animation metrics
            break;
        case animationMetrics.PropertyAnimationType.translation:
            // Retrieve translation animation metrics
            break;
        case animationMetrics.PropertyAnimationType.opacity:
            
            // Retrieve scale animation metrics
            break;
    }
}

The following example shows the C# version of the same code.



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;
}

The following example shows the C++ version of the same code.



using namespace Windows::UI::Core::AnimationMetrics;



                    

Requirements

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone

None supported

Namespace

Windows.UI.Core.AnimationMetrics
Windows::UI::Core::AnimationMetrics [C++]

Metadata

Windows.winmd

See also

Animation metrics sample
OpacityAnimation
ScaleAnimation
TranslationAnimation

 

 

Show:
© 2014 Microsoft. All rights reserved.