次の方法で共有


Mango Sample: Resources Part 1: Themes

image_thumb[11]This is part 3 in the Resource series.

  1. Part 1: Themes
  2. Part 2: Colors
  3. Part 3: Sizes
  4. Part 4: Styles

Themes

Windows Phone provides a series of resources to delivers. They include Brushes, Colors, Sizes, and Styles. Although a developer could create their own, it is the best practice is to use the Phone Resources.

The reason for this is simple. Phone users can change the theme from Light to Dark. Phone resources update dynamically based on the current theme. Where hard coded colors may render invisible, phone resources are always correct.

image_thumb2

In the image above, the hard coded black on the bottom is lost when the theme is Dark. The hard coded white in the middle is lost when the theme is Light. The top text switches colors to adjust to the theme by using the native Phone Resources.

Read the whole article here.