共用方式為


AnimatedSettingsVisualSource.SetColorProperty(String, Color) 方法

定義

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

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);
function setColorProperty(propertyName, 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 檔案中。 例如,如果您在名為 Foreground 的 Lottie 動畫中定義色彩屬性,您可以使用 屬性來設定色彩 AnimatedIcon.Foreground

適用於

另請參閱