Partager via


AnimatedSettingsVisualSource.SetColorProperty(String, Color) Méthode

Définition

Définit la couleur du visuel animé pour un 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)

Paramètres

propertyName
String

Platform::String

winrt::hstring

Nom de propriété de la couleur telle que définie dans le fichier JSON de l’icône animée.

value
Color

Valeur de couleur sur laquelle l’icône animée est définie.

Implémente

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)

Remarques

Le nom de propriété de la couleur est défini dans le fichier JSON généré par LottieGen pour l’icône animée. Par exemple, si vous définissez une propriété de couleur dans votre animation Lottie nommée Foreground, vous pouvez définir la couleur à l’aide de la AnimatedIcon.Foreground propriété .

S’applique à

Voir aussi