Share via


IAnimatedVisualSource2.SetColorProperty(String, Color) 方法

定義

設定動畫視覺效果的色彩。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

public:
 void SetColorProperty(Platform::String ^ propertyName, Color value);
void SetColorProperty(winrt::hstring const& propertyName, Color const& value);
public void SetColorProperty(string propertyName, Color value);
Public Sub SetColorProperty (propertyName As String, value As Color)

參數

propertyName
String

Platform::String

winrt::hstring

動畫圖標 JSON 檔案中所定義的色彩屬性名稱。

value
Color

propertyName的色彩值。

備註

動畫圖標的 JSON 檔案是由 LottieGen產生。 例如,如果您在名為 的 Lottie 動畫 Foreground 中定義色彩屬性,您可以使用 屬性來設定色彩 AnimatedIcon.Foreground

適用於