I’ve got several instances in my app where I’m using a png icon from the standard wp7 icon library. I need to be able to alternate between light and dark versions of this png depending on the theme that the handset device is set to.
Now, I know how to detect the theme. However, how should I handle alternating between two versions of my images?
Do I create 2 different resource dictionaries and programatically switch between them in code? (honestly I have no clue how to do this)
Do I set some static resource “flag” somewhere based on what theme is detected?
I’m having some difficulty with my approach here, and would appreciate some guidance.
Here are some solutions:
Option 1)
You could use one image and OpacityMask so that your icons will remain consistent in both light/dark themes.
Option 2) You can take a look at this discussion:
LockedHow to change Metro icons based on selected theme