zoukankan      html  css  js  c++  java
  • SystemFonts Class的典型用法?

    SystemFonts是一个字体资源类, 它的用法在下面代码中可以看出:

    <Button Margin="10, 10, 5, 5" Grid.Column="0" Grid.Row="3"     

         FontSize="{x:Static SystemFonts.IconFontSize}"

         FontWeight="{x:Static SystemFonts.MessageFontWeight}"

         FontFamily="{x:Static SystemFonts.CaptionFontFamily}">

         SystemFonts

    </Button>

    这段代码对应的C#代码是:

    Button btncsharp = new Button();

    btncsharp.Content = "SystemFonts";

    btncsharp.Background = SystemColors.ControlDarkDarkBrush;

    btncsharp.FontSize = SystemFonts.IconFontSize;

    btncsharp.FontWeight = SystemFonts.MessageFontWeight;

    btncsharp.FontFamily = SystemFonts.CaptionFontFamily;

    cv1.Children.Add(btncsharp);

     

    This example shows how to use the static resources of SystemFonts in order to style or customize a button.

    这个例子演示了如何使用SystemFonts的静态资源去定制一个button.

    SystemFonts is a class that contains both system font values and resources that bind to the values, for example, CaptionFontFamily is a SystemFonts value and CaptionFontFamilyKey is a corresponding resource key.

    SystemFonts类是一个既包含系统字体值又包含绑定到系统字体值的系统字体资源. 例如CaptionFontFamily是一个SystemFonts的值, CaptionFontFamilyKey是一个SystemFonts的资源关键字.

  • 相关阅读:
    不得不说微信之怪现状
    新手运营如何做广告位投放
    网络营销人员如何培养创新技能
    GoDaddy开通中文客服电话,沟通不再是问题
    为zblog FCKeditor编辑器添加设置字体格式h1 h2功能
    真实手机访问本地电脑网站失败的原因
    数据库简总
    简单总结
    GUI图形用户界面学习
    集合框架
  • 原文地址:https://www.cnblogs.com/dunnice/p/640157.html
Copyright © 2011-2022 走看看