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的资源关键字.

  • 相关阅读:
    【Linux】ZeroMQ 在 centos下的安装
    ZeroMQ下载、编译和使用
    在Linux系统上安装Git
    Linux下python2.7安装pip
    [Tyvj1474]打鼹鼠
    [BZOJ2908]又是nand
    [SPOJ375]Qtree
    浅谈算法——树链剖分
    [BZOJ5368/Pkusc2018]真实排名
    [FJOI2007]轮状病毒
  • 原文地址:https://www.cnblogs.com/dunnice/p/640157.html
Copyright © 2011-2022 走看看