共用方式為


ElementCompositionPreview.SetImplicitShowAnimation 方法

定義

將指定的顯示動畫與 UIElement 產生關聯。

public:
 static void SetImplicitShowAnimation(UIElement ^ element, ICompositionAnimationBase ^ animation);
 static void SetImplicitShowAnimation(UIElement const& element, ICompositionAnimationBase const& animation);
public static void SetImplicitShowAnimation(UIElement element, ICompositionAnimationBase animation);
function setImplicitShowAnimation(element, animation)
Public Shared Sub SetImplicitShowAnimation (element As UIElement, animation As ICompositionAnimationBase)

參數

element
UIElement

要與動畫建立關聯的 UIElement。

animation
ICompositionAnimationBase

顯示 UIElement 時要播放的動畫。 Null值可防止顯示動畫播放這個專案,直到使用動畫值再次呼叫 方法為止。

備註

當元素新增至場景或其 Visibility 屬性變成 Visibility.Visible時,元素及其所有子系都會在 UI 樹狀結構中播放其顯示動畫。

適用於