Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force to use light theme in Windows Phone 7?

In my Windows Phone 7 app, I want to use the light theme, no matter what theme the user sets in the phone. How to do that ?

Do I need to custom the style or theme ? I just want the default light theme.

Thanks

like image 876
user403015 Avatar asked Nov 04 '10 11:11

user403015


3 Answers

Jeff Wilcox offers a good way to do this using a theme manager he developed.

http://www.jeff.wilcox.name/2012/01/phonethememanager/

like image 159
Bevan Avatar answered Nov 11 '22 03:11

Bevan


There is a nice way of replacing the default brushes. Saves you setting Forecolor everywhere.

http://www.designersilverlight.com/2011/01/17/theme-forcing-for-windows-phone-7-silverlight/

You'll still need to set the background of the main layout node to the default background brush.

Background="{StaticResource PhoneBackgroundBrush}"
like image 3
iain Avatar answered Nov 11 '22 04:11

iain


There is no way to force an app to use a specific theme.

The best you can do is create your own style for every control you use and mimic the light theme in your styles.

Beware, this can be a time consuming and tedious task. Be sure to test all pages and all controls in all states when both the light and dark themes have been specified by the user.

I've had to do this (but for the dark theme) and it's not something I'd do again out of choice.

There are a few tips on doing this from one of the PDC sessions on optimising performance http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/10/28/pdc-live-optimizing-performance-for-silverlight-windows-phone-7-applications.aspx

like image 2
Matt Lacey Avatar answered Nov 11 '22 02:11

Matt Lacey