Share via


AnimatedAcceptVisualSource.SetColorProperty(String, Color) Method

Definition

Sets the color of the animated visual for an AnimatedIcon.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the 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)

Parameters

propertyName
String

Platform::String

winrt::hstring

The property name of the color as defined in the JSON file for the animated icon.

value
Color

The color value the animated icon is being set to.

Implements

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)

Remarks

The property name of the color is defined in the JSON file generated by LottieGen for the animated icon. For example, if you define a color property in your Lottie animation named Foreground, you can set the color using the AnimatedIcon.Foreground property.

Applies to

See also