开发者

Best practices for customizing themes

What are the best practices for customizing themes for a WP7 application (font family, colours, etc)? Should I be sticking to the standard names and replacing them or creating new resource names and using those?

ie. "PhoneFontFamilyNormal" or "MyAppFontFamilyNormal"? "PhoneTextNormalStyle" or "MyAppTextNormalStyle"?

The documentation on the subject seems to focus soley on pl开发者_C百科aying the straight and norrow, even though custom themes are supported (if disueded).


I would personally create my own resources with unique names and use those. This avoids any confusion relating to precedence (I can't recall right now the resource look-up mechanism in Silverlight, I know that it is a simplification of the WPF one - which is a little complex!).

One important consideration is whether you will support dark / light themes. The standard theme resources like PhoneBackgroundBrush will honour the users theme. Therefore, if you wish to support Dark / Light I would recommend deriving your own theme from the standard one, for example, you might derive your background brush from PhoneBackgroundColor.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜