How to setUp Button Background image either theme is dark or white
I use below code to set up button background image using a png file with white image.
<pre>
ImageBrush brush = new ImageBrush();    

brush.ImageSource = new BitmapImage(new Uri(@"/Images/delete.png", UriKind.Relative));     

btnDel.Background = brush;
</pre>

here my problems:

the png file has white image.

1) When in Dark Theme, I can see the White image from the png file. But when I change the Theme to light, I can no longer see the white Image.

Do I need to detect the theme being set by the user then I need to use another png file with Black image?

Thanks
How to setUp Button Background image either theme is dark or white
===

I use below code to set up button background image using a png file with white image.
<pre>
ImageBrush brush = new ImageBrush();    

brush.ImageSource = new BitmapImage(new Uri(@"/Images/delete.png", UriKind.Relative));     

btnDel.Background = brush;
</pre>

here my problems:

the png file has white image.

1) When in Dark Theme, I can see the White image from the png file. But when I change the Theme to light, I can no longer see the white Image.

Do I need to detect the theme being set by the user then I need to use another png file with Black image?

Thanks