Svg.Skia icon indicating copy to clipboard operation
Svg.Skia copied to clipboard

Avalonia control change color

Open tommaier123 opened this issue 2 years ago • 2 comments

Hello, I'm using the Avalonia control to display buttons. Currently I switch between multiple SVGs with highlighted/disabled color. I want to add styling so I would need to dynamically change the color. Is there a way to do that?

tommaier123 avatar Mar 22 '22 20:03 tommaier123

I was wondering the same thing. I could not find a way to do it with this library, so instead I manually copied the path data from the SVG into an Avalonia Path object. Then you can set the Fill and Stroke.

Ben290182 avatar Apr 07 '22 06:04 Ben290182

Great suggestion. I can easily export the XAML path from Inkscape.

tommaier123 avatar Apr 07 '22 06:04 tommaier123

Please use https://github.com/wieslawsoltes/SvgToXaml

wieslawsoltes avatar Aug 26 '22 05:08 wieslawsoltes