开发者

How to change the theme of application if the system theme has been change in Windows Phone 7

开发者 https://www.devze.com 2023-04-12 18:21 出处:网络
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

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

0

精彩评论

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

关注公众号