I am develop an UWP app, and I am using template10. I have two images, one white and other black. I want show black image in light theme, and white image in dark theme. I have this code:
if (this.RequestedTheme == ElementTheme.Light)
Image.Source = new BitmapImage(new Uri("ms-appx:///Assets/BlackImage.png"));
else
Image.Source = new BitmapImage(new Uri("ms-appx:///Assets/WhiteImage.png"));
But, when I choose light theme image dont appear! But when I choose dark theme, white image appears.
this? Is itApplication? OrPage? Also are you using this inInitialization? orButtonClick? - AVK