AnimationDescription class
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
var animationDescription = new Windows.UI.Core.AnimationMetrics.AnimationDescription();
Attributes
- ActivatableAttribute(Windows.UI.Core.AnimationMetrics.IAnimationDescriptionFactory, NTDDI_WIN8)
- DualApiPartitionAttribute()
- MarshalingBehaviorAttribute(Agile)
- VersionAttribute(NTDDI_WIN8)
Members
The AnimationDescription class has these types of members:
Constructors
The AnimationDescription class has these constructors.
| Constructor | Description |
|---|---|
| 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.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the collection of animations that are associated with the AnimationDescription object. | |
| Read-only | Gets the maximum cumulative delay time for the animation to be applied to the collection of objects in a target. | |
| Read-only | 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. | |
| Read-only | Gets a multiplier that is applied to each occurrence of the stagger delay, increasing or decreasing the previous delay instance by that amount. | |
| Read-only | Gets 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] |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 12/4/2012
