FontWeight 结构
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
以笔画的粗细来引用字体的密度。
public value class FontWeight : IFormattable
[System.ComponentModel.TypeConverter(typeof(System.Windows.FontWeightConverter))]
[System.Windows.Localizability(System.Windows.LocalizationCategory.None)]
public struct FontWeight : IFormattable
[<System.ComponentModel.TypeConverter(typeof(System.Windows.FontWeightConverter))>]
[<System.Windows.Localizability(System.Windows.LocalizationCategory.None)>]
type FontWeight = struct
interface IFormattable
Public Structure FontWeight
Implements IFormattable
- 继承
- 属性
- 实现
在下面的代码示例中 FontWeight , 设置为“UltraBold”。
<TextBlock FontWeight="UltraBold" FontFamily="Gil Sans MT">Hello, world</TextBlock>
与同一字样中的“正常”字符相比,粗细通常通过与字样中给定字符关联的增加笔划或粗细来区分。
注意 并非所有权重都适用于所有字样。 当字样不能使用权重时,将返回最接近的匹配权重。
<object fontWeightProperty="fontWeightsValue"/>
fontWeightsValue
属性 FontWeights 名称,例如“Light”、“Normal”或“UltraBold”。
Compare(Font |
比较 FontWeight 的两个实例。 |
Equals(Font |
确定当前的 FontWeight 对象是否与指定的 FontWeight 对象相等。 |
Equals(Object) |
确定当前的 FontWeight 对象是否与指定对象相等。 |
From |
创建对应于 OpenType |
Get |
检索此对象的哈希代码。 |
To |
返回一个值,该值代表 对象的 OpenType |
To |
返回一个文本字符串,该字符串表示 FontWeight 对象的值且基于 CurrentCulture 属性信息。 |
Equality(Font |
比较 FontWeight 的两个实例是否相等。 |
Greater |
对 FontWeight 的两个实例进行计算,以确定其中一个实例是否大于另一个实例。 |
Greater |
对 FontWeight 的两个实例进行计算,以确定其中一个实例是否大于或等于另一个实例。 |
Inequality(Font |
对 FontWeight 的两个实例进行评估,以确定它们是否不相等。 |
Less |
对 FontWeight 的两个实例进行计算,以确定其中一个实例是否小于另一个实例。 |
Less |
对 FontWeight 的两个实例进行计算,以确定其中一个实例是否小于或等于另一个实例。 |
产品 | 版本 |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |