Windows Store App Development Snack: Change App Theme from Dark to Light
Join the DZone community and get the full member experience.
Join For Free
the solution to this is to change it in the app.xaml file – but going to the application node (the very first one) and adding requestedtheme="light" to switch to the light theme or requestedtheme="dark" to switch to the dark theme.
this will have a massive impact on the overall appearance of your application!
a word of warning – you may also see the runtime property for this under app.current.requestedtheme and assume you can change it at runtime, however that will raise a notsupportedexception. what you can do is set it on start-up, so if you want to change it “dynamically” the user will need to restart the app for the change to be applied (microsoft has a sample to show this).

lastly an interesting tidbit from the documentation on this:
this property is ignored if the user is running in high contrast mode.for more posts in this series, see the series index .
app
Light (web browser)
Published at DZone with permission of Robert Maclean, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments