AnimationDescription クラス

定義

特定のターゲットに対して実行される個々のアニメーション効果のコレクションを公開して、Windows の完全な不透明度、スケーリング、または翻訳アニメーションを構成します。

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
継承
Object Platform::Object IInspectable AnimationDescription
属性

Windows の要件

デバイス ファミリ
Windows Desktop Extension SDK (10.0.10240.0 で導入)
API contract
Windows.UI.Core.AnimationMetrics.AnimationMetricsContract (v1.0 で導入)

この例では、AnimationDescription オブジェクトの作成とその使用方法を示します。 効果パラメーターとターゲット パラメーターは、以前に割り当てられていると見なされます。

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

コンストラクター

AnimationDescription(AnimationEffect, AnimationEffectTarget)

特定のアニメーションとターゲットを持つ AnimationDescription オブジェクトを作成します。

プロパティ

Animations

AnimationDescription オブジェクトに関連付けられているアニメーションのコレクションを取得します。

DelayLimit

ターゲット内のオブジェクトのコレクションに適用されるアニメーションの最大累積遅延時間を取得します。

StaggerDelay

複数のオブジェクトを含むターゲット内の各オブジェクトにアニメーション効果を適用するまでの時間を取得します。 StaggerDelay は、StaggerDelayFactor と DelayLimit と共に、アニメーション効果の相対的なタイミングを制御するために使用される 3 つの要素のうちの 1 つです。

StaggerDelayFactor

遅延が発生するたびに適用される乗数を取得します。前の遅延インスタンスをその量だけ増減します。

ZOrder

同じアニメーション効果の他の AnimationDescription オブジェクトに対する AnimationDescription オブジェクトの z オーダー位置を取得します。   Z オーダーのカバー遷移が大きい AnimationDescription オブジェクトは、z オーダーが低くなります。

適用対象

こちらもご覧ください