Win8 metro and Windows Phone style problems

Source: Internet
Author: User

Win8 metro and Windows Phone both use the XAML description interface, but there are some differences in style:

The topics of Win8 are controlled by developers and can be found in APP. XAML. CS.CodeSet requestedtheme = "dark" or light. You can also specify it directly in APP. XAML.

The theme of Windows Phone is controlled by users. Users can set a dark or light color in the system. In this way, developers must adapt to the two themes, which are generally set to a dark one, however, pay attention to whether the text in a light-colored topic can be properly displayed.

There is a tool that forces you to set the topic of an application to overwrite your settings. Reference http://www.dotblogs.com.tw/ouch1978/archive/2012/05/22/wp7-phone-theme-manager.aspx

Original article linkHttp://www.jeff.wilcox.name/2012/01/phonethememanager/

It is easy to use. Search for winodw phone theme manager in nuget and install the following code:

 
Thememanager. tolighttheme ();

 

To switch the topic of the Win8 Metro application, refer to here:

Http://mikaelkoskinen.net/post/windows-8-winrt-metro-xaml-application-theme-dark-light.aspx

This is also an official Microsoft example.

Another scenario is that the application uses a dark topic, but in some pages, such as "set" and "about" pages, the light topic needs to be used, then we need to overwrite the system topic. The default topic isC: \ Program Files (x86) \ Windows kits \ 8.0 \ include \ winrt \ XAML \ design \ contains two files: Generic. XAML and themeresources. XAML,You can open generic. see the content in the XAML, which contains various themes of dark and light. When the app starts, it calls the above image brush resources, therefore, style = "{staticresource itemtextstyle}" can be directly referenced in the XAML code. What if I want to change other topics on a page?

I thought of a stupid way to copy the paint brush of dark or light and the style of each control directly, and it should be able to overwrite the style of the system. But it always does not work. Later I thought it may be a key conflict, so I changed all the keys in the blend. Blend will prompt which styles use this paint brush and update them all. This is normal.

If you have a better solution, leave a message to discuss it.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.