Changing the stroke color of a rendered svg file at runtime?

Viewed 135

I'm trying to create some scalable buttons in a WinUI application using svg files. I've achieved this at the moment using an image control as the button's context, similar to the below:

<Button Name="MyButton">
    <Image Source="Path/To/My/Image.svg"/>
</Button> 

The svgs are simple black and white images, but I would like to change the stroke color based on the current application theme. Is there a way to do this which doesn't involve creating a separate set of DarkMode svgs?

0 Answers
Related