How to Invert Color of XAML PNG Images using C#?

Viewed 5311

I'm using Visual Studio, C#, XAML, WPF.

In my program I have XAML buttons with white png icons.

enter image description here

I want to have it so you can switch to a theme with black icons by choosing the theme from a ComboBox.

Instead of creating a new set of black png images, is there a way with XAML and C# I can invert the color of the white icons?

<Button x:Name="btnInfo" HorizontalAlignment="Left" Margin="10,233,0,0" VerticalAlignment="Top" Width="22" Height="22" Cursor="Hand" Click="buttonInfo_Click" Style="{DynamicResource ButtonSmall}">
    <Image Source="Resources/Images/info.png" Width="5" Height="10" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="1,0,0,0"/>
</Button>
1 Answers
Related