How to change the theme of application if the system theme has been change in Windows Phone 7
How to change the theme of application if the system theme has been change in Windows Phone 7 if ap开发者_如何学编程plication in Runing?
The system theme applies throughout all apps. So if system them changes and you have used one of the system defined colors/ fonts, etc in your app, the app will automatically start using the new theme colors/ fonts.
So for eg: in your app, if you have:
<TextBlock x:Name="ApplicationTitle" Text="My App Title" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle" Text="Page Title" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
here "StaticResource PhoneTextNormalStyle" specifies that you are using this system defined style. Now when user changes their system theme, this will automatically change colors in your app. also.
See http://msdn.microsoft.com/en-us/library/ff769545(v=vs.92).aspx
精彩评论