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

拟墨画扇 提交于 2020-01-02 02:03:39

问题


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


回答1:


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

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




回答2:


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}"



回答3:


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




回答4:


This is a very bad idea.

Windows Phones use OLED displays - the pixels generate light directly, they are not backlit. Power consumption is therefore highest for white pixels. This is why Microsoft is suddenly obsessed with light text on dark backgrounds. It's not a back-to-the-seventies thing.

If you do this you will cause ridiculous power consumption.

For the benefit of the jerk who voted down a factually correct answer, I quote page 63 of the Windows Phone 7 UI Design and Interaction Guide published in July 2010 by Microsoft.

Avoid using too much white in applications, such as white backgrounds, as this may have an impact on battery life for devices that have organic LED displays.

If you're wondering why Microsoft included a "light background" theme option, so am I.



来源:https://stackoverflow.com/questions/4096388/how-to-force-to-use-light-theme-in-windows-phone-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!