DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Windows Store App Development Snack: Change App Theme from Dark to Light

Robert Maclean user avatar by
Robert Maclean
·
Oct. 25, 12 · Interview
Like (0)
Save
Tweet
Share
4.70K Views

Join the DZone community and get the full member experience.

Join For Free
image you may have seen in visual studio & blend the option to change the windows theme from dark (the default) to light. the problem is that is a runtime it seems to make zero difference and there is no way in windows 8 to change it (like we had with windows phone).

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.

image


this will have a massive impact on the overall appearance of your application!

image


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).
image
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.

Popular on DZone

  • Using JSON Web Encryption (JWE)
  • Kubernetes vs Docker: Differences Explained
  • What Is Policy-as-Code? An Introduction to Open Policy Agent
  • Beginners’ Guide to Run a Linux Server Securely

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: