Share via


IAnimatedVisualSource2.SetColorProperty(String, Color) 方法

定義

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

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

參數

propertyName
String

Platform::String

winrt::hstring

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

value
Color

propertyName 的色彩值。

備註

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

適用於