This is a migrated thread and some comments may be shown as answers.

Forcing dark theme in application

1 Answer 99 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
AbdouMoumen
Top achievements
Rank 1
AbdouMoumen asked on 12 May 2012, 12:28 PM
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

1 Answer, 1 is accepted

Sort by
0
AbdouMoumen
Top achievements
Rank 1
answered on 12 May 2012, 02:14 PM
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 ;)
Tags
General Discussions
Asked by
AbdouMoumen
Top achievements
Rank 1
Answers by
AbdouMoumen
Top achievements
Rank 1
Share this question
or