Share via


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值可防止顯示這個專案的動畫播放,直到使用動畫值再次呼叫 方法為止。

Windows 需求

裝置系列
Windows 10 Creators Update (已於 10.0.15063.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v4.0 引進)

備註

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

適用於