AnimationDescription 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
公開在特定目標上執行的個別動畫效果集合,以組成完整的 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
- 繼承
- 屬性
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 是用來控制動畫效果相對時間的三個元素之一。 |
StaggerDelayFactor |
取得乘數,這個乘數會套用至每次出現的交錯延遲,並依該數量增加或減少先前的延遲實例。 |
ZOrder |
取得 AnimationDescription 物件相對於相同動畫效果中其他 AnimationDescription 物件的 Z 順序位置。 具有較高迭置順序的AnimationDescription物件會以較低的 Z 順序涵蓋轉換。 |