In windows phone7, the system sets some resources in advance to ensure style consistency. In IISL, these resources are written in the App during project creation. in xaml, but it is hidden after beta.
I. system resources:
These are the predefined resources of the system, including fonts, colors, and brushes.
Ii. Usage:
To use system resources, the simplest method is to use StaticResource in XAML, which is very common in xaml files. For example:
FontFamily = "{StaticResource PhoneFontFamilyNormal }"
FontSize = "{StaticResource PhoneFontSizeNormal }"
Foreground = "{StaticResource PhoneForegroundBrush }"
By using predefined system resources in your own project, you can maintain the same style as the system. The Theme must be consistent with the set Theme. You can also say that you must use the resources provided by the system to make your own applications change along with Theme settings. However, for Theme, there are mainly two (background and accent color). Therefore, to be consistent with Theme in your own project, you need to use PhoneBackgroundBrush, PhoneBackgroundColor, PhoneAccentBrush, or PhoneAccentColor.
In addition, you can use code to call system resources.
SystemColor = (Color) Application. Current. Resources ["PhoneAccentColor"];