开发者

How do I share styles in WP7?

开发者 https://www.devze.com 2023-01-17 02:12 出处:网络
There\'s no \"ResourceDictionary\" templates in the WP7 SDK. Is there a di开发者_JAVA技巧fferent way of creating styles to share across pages?

There's no "ResourceDictionary" templates in the WP7 SDK. Is there a di开发者_JAVA技巧fferent way of creating styles to share across pages?

Thanks!


App.xaml is the starting point where you can create various styles - specifically in Application.Resources.

And what do you mean by:

There's no "ResourceDictionary" templates in the WP7 SDK

What's wrong with using ResourceDictionary directly in App.xaml?


You can use to share it

    <!--Application Resources-->
<Application.Resources>
    <Style x:Key="bestButtonStyle" TargetType="ButtonBase">
...

Or page resouces to limit the scope

    <phone:PhoneApplicationPage.Resources>
            <Storyboard  x:Name="historyAnimationIn">
0

精彩评论

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