Share via


AnimatedSettingsVisualSource.SetColorProperty(String, Color) 方法

定義

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

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

public:
 virtual void SetColorProperty(Platform::String ^ propertyName, Color value) = SetColorProperty;
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

動畫圖標設定為 的色彩值。

實作

M:Microsoft.UI.Xaml.Controls.IAnimatedVisualSource2.SetColorProperty(System.String,Windows.UI.Color) M:Microsoft.UI.Xaml.Controls.IAnimatedVisualSource2.SetColorProperty(Platform::String,Windows.UI.Color) M:Microsoft.UI.Xaml.Controls.IAnimatedVisualSource2.SetColorProperty(winrt::hstring,Windows.UI.Color)

備註

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

適用於

另請參閱