Forcing dark theme in application

2 posts, 0 answers
  1. AbdouMoumen
    AbdouMoumen avatar
    6 posts
    Member since:
    Oct 2010

    Posted 12 May 2012 Link to this post

    Hi,

    I'm building a WP7 application, and utilizing some of the Rad controls for Windows Phone. My client wants the app to force the dark theme, which I accomplished by using a DarkStyles.xaml resource dictionary that is contains the definitions for all the default dark styles. This is added to the app.xaml, and would be used whenever a control requests a default style (PhoneForegroundBrush, for example).
    This worked well with almost all of the default controls, but doesn't work with the RadControls! in my particular case it's the RadChart, where the text in the axes and the plot area should remain white when switching to the light theme, but it goes black (following the theme). I tried defining the particular styles (forground, background, etc.) in the resource dictionary for the chart, but to no avail!

    Is there a way to achieve this? am I doing something wrong?

    thanks in advance
  2. AbdouMoumen
    AbdouMoumen avatar
    6 posts
    Member since:
    Oct 2010

    Posted 12 May 2012 Link to this post

    FIXED!
    Apparently, the method I used to force the dark theme is kind of deprecated in Mango. To override the theme now, I had to swap the colors of the brushes from code in the App constructor. Here's an article on this from WindowsPhoneGeek.
    http://www.windowsphonegeek.com/articles/How-to-port-your-WP7-custom-application-Theme-to-Windows-Phone-Mango

    Hope this would help some people ;)
  3. DevCraft banner
Back to Top