IAnimatedVisualSource2.SetColorProperty(String, Color) 方法

定义

设置动画视觉对象的颜色。

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

propertyName 的颜色值。

注解

动画图标的 JSON 文件由 LottieGen 生成。 例如,如果在 Lottie 动画中定义名为 Foreground的颜色属性,则可以使用 AnimatedIcon.Foreground 属性设置颜色。

适用于