Share via


AnimatedBackVisualSource.SetColorProperty(String, Color) Methode

Definition

Legt die Farbe des animierten Visuals für ein AnimiertesIcon fest.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

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)

Parameter

propertyName
String

Platform::String

winrt::hstring

Der Eigenschaftenname der Farbe, wie in der JSON-Datei für das animierte Symbol definiert.

value
Color

Der Farbwert, auf den das animierte Symbol festgelegt wird.

Implementiert

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)

Hinweise

Der Eigenschaftenname der Farbe wird in der JSON-Datei definiert, die von LottieGen für das animierte Symbol generiert wird. Wenn Sie beispielsweise eine Farbeigenschaft in Ihrer Lottie-Animation mit dem Namen Foregrounddefinieren, können Sie die Farbe mithilfe der AnimatedIcon.Foreground -Eigenschaft festlegen.

Gilt für:

Weitere Informationen