首页 > 其他 > 详细

xaml中Style的继承

时间:2015-12-08 20:21:10      阅读:143      评论:0      收藏:0      [点我收藏+]

语法

        <Style x:Key="tb1" TargetType="TextBlock">
            <Setter Property="FontSize" Value="30"/>
            <Setter Property="Foreground" Value="Red"/>
        </Style>
        <Style x:Key="tb2" TargetType="TextBlock" BasedOn="{StaticResource tb1}">
            <Setter Property="Foreground" Value="Green"/>
            <Setter Property="FontWeight" Value="Bold"/>
        </Style>

 

当某个基准样式与 BasedOn 样式具有同一个属性时,将使用在 BasedOn 样式中设置的属性值。

xaml中Style的继承

原文:http://www.cnblogs.com/AD1988/p/5030758.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!