共用方式為


CompositionObject.StartAnimationWithIAnimationObject 方法

定義

將動畫與目標物件的指定屬性連接,並啟動動畫。

public:
 static void StartAnimationWithIAnimationObject(IAnimationObject ^ target, Platform::String ^ propertyName, CompositionAnimation ^ animation);
 static void StartAnimationWithIAnimationObject(IAnimationObject const& target, winrt::hstring const& propertyName, CompositionAnimation const& animation);
public static void StartAnimationWithIAnimationObject(IAnimationObject target, string propertyName, CompositionAnimation animation);
function startAnimationWithIAnimationObject(target, propertyName, animation)
Public Shared Sub StartAnimationWithIAnimationObject (target As IAnimationObject, propertyName As String, animation As CompositionAnimation)

參數

target
IAnimationObject

物件,定義要產生動畫效果的屬性。

propertyName
String

Platform::String

winrt::hstring

要與動畫建立關聯的屬性。

animation
CompositionAnimation

要與指定屬性產生關聯的動畫。

Windows 需求

裝置系列
Windows 10, version 1809 (已於 10.0.17763.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v7.0 引進)

適用於