码迷,mamicode.com
首页 > Windows程序 > 详细

Styles in Windows Phone

时间:2015-06-27 06:24:31      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:

1. Use resources in internal style file:

<Application.Resources>
    <ResourceDictionary Source="MyResources.xaml" />
</Application.Resources>

2. Use external style file:

<Application.Resources>
    <ResourceDictionary Source="/MyExternalAssembly;component/MyResources.xaml" />
</Application.Resources>

3. Use multiple style files:

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/Styles/Style1.xaml"/>
            <ResourceDictionary Source="/Styles/Style2.xaml"/>
            <ResourceDictionary Source="/MyExternalAssembly;component/MyResources.xaml" />
        </ResourceDictionary.MergedDictionaries>
        <Style TargetType="Button">
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="FontSize" Value="28"/>
        </Style>
    </ResourceDictionary>
</Application.Resources>

 

Styles in Windows Phone

标签:

原文地址:http://www.cnblogs.com/Tealcwu/p/4603563.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!