Windows phone dark light theme

By using our site, you acknowledge that you have read and understand our Cookie Policy , Privacy Policy , and our Terms of Service. I think this is a very common problem, but I cannot find a suitable solution for me. As you all know, WP supports a dark and a light theme. The user can change the theme and there are ways to override his decision and to display everything in the color theme you've selected.


  • More dark/light theme data points and potential battery savings!
  • samsung galaxy note 3 activesync.
  • emoji on iphone ios 5;
  • free download mobile telugu movie songs.

However, I'm just trying to react to this two theme types and I want to display icons in the correct color. If you use the Application Bar, you can select from many built in icons, which will be automatically inverted from light to dark and vice versa. Why isn't there any support for normal images? For example: I want to display a telephone icon. I've picked one from the built in icons and copied it from the Microsoft SDK folder to the Image folder of my project.

Your Answer

If the user uses the dark theme, everything will be fine because the white telephone icon will be visible on the black background. But if he switches to the light theme, the icon will be invisible because it is white on white. I'm fully aware of the style resources for textboxes or background colors, which use the phone's accent or theme color.

Of course I could detect in the constructor of the page if the user is in dark or light mode. I would then load either a black or white version of the telephone icon. But this check will be done everytime I visit the page and slows everything down. It's also annoying to manually add the check for the theme each time I'm adding a theme aware image. Is there any solution, which will work with XAML only?

kabtilytno.tk/map10.php

More dark/light theme data points and potential battery savings

Or is at least easy to maintain? And why can't I use the built in images from the SDK right from the beginning? They are already available in dark and light versions and are already used in the application bar. If you want the icon to function like in the actionbar, just be white if dark theme and black if light theme then you can add the image as an opacity mask to a rectangle, like this:. I added a property to the base class of my Views that returns the selected theme. It is also possible to use a ValueConverter that turns a logical name of a resource into a name of a theme specific resource.

Have a look at this: Detect the theme Supporting dark and light themes gives the best solution for this, I think , and then set the image accordingly.


  1. Windows Phone 8.1 Runtime – Forcing Light or Dark Theme.
  2. How to enable dark mode in Windows 10.
  3. Windows Phone 8 Tip: Customize the Theme;
  4. jailbreak ios 6 ipad a6x.
  5. If you do this a lot, a custom control where you can supply two image sources and the correct one gets used would be easy enough to create. Here's another good article on this topic. New Screen Resolutions. You pick a White Foregrounded icon use it. It suits for both Light and Dark themes. Thats what I have been doing. The Coding 4 Fun control toolkit includes a round button that mimics the application bar buttons, including updating the foreground color depending on the theme.

    News, reviews, information and apps for Windows Phone.

    The code is open source, so perhaps you might find an answer in there. Or, as a hack, you could use the RoundButton control, turn off the border, and not provide a Click event. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service , privacy policy and cookie policy , and that your continued use of the website is subject to these policies. Ram 2, 9 31 Markus Rudel Markus Rudel 1, 14 If you want the icon to function like in the actionbar, just be white if dark theme and black if light theme then you can add the image as an opacity mask to a rectangle, like this: Johan Falk Johan Falk 4, 2 24 That's it!

    Minimal effort and maximal results: Could this combination of Rectangle and OpacityMask be used in a single style definition? An alternative that a number of developers have tried is to replace the default values for the color and brush resources.

    Windows Phone 8 Tip: Customize the Theme | IT Pro

    For example, the following code updates the foreground color and brushes to red. The solution to the problem is to invest a little more time in creating a design that works in both the dark and light themes. This is supported by Marketplace technical requirement 5. The Windows Phone platform offers users a choice between the dark and light themes.

    Automatically switch between Windows 10 Dark and Light theme with Windows Auto-Night Mode

    As an application developer, you should be looking to incorporate these choices into your application. Nick Randolph runs Built to Roam, a consulting company that specializes in training, mentoring and assisting other companies build mobile applications.

    With a heritage in rich client applications for both the desktop and a variety of mobile platforms, Nick currently presents, writes and educates on the Windows Phone platform. Printable Format. I agree to this site's Privacy Policy. The Windows Phone team took this to the next level by providing a set of styles that can be reused by application developers, which was covered in an earlier post, "Style Your Application with Windows Phone 7 System Resources.

    Figure 1.

    New Windows 10 Theme - 2019

    Updating the foreground color and brushes to red. About the Author Nick Randolph runs Built to Roam, a consulting company that specializes in training, mentoring and assisting other companies build mobile applications.