TextDecorationUnit 枚举

定义

指定 TextDecorationPenOffsetPen 粗细值的单位类型。Specifies the unit type of either a TextDecorationPenOffset or a Pen thickness value.

public enum class TextDecorationUnit
public enum TextDecorationUnit
type TextDecorationUnit = 
Public Enum TextDecorationUnit
继承
TextDecorationUnit

字段

FontRecommended 0

相对于 TextDecoration 所用字体的单位值。A unit value that is relative to the font used for the TextDecoration. 如果修饰跨越多种字体,则计算推荐的平均值。If the decoration spans multiple fonts, an average recommended value is calculated. 这是默认值。This is the default value.

FontRenderingEmSize 1

相对于字体全身大小的单位值。A unit value that is relative to the em size of the font. 偏移值或粗细值等于偏移值或粗细值乘以字体全身大小。The value of the offset or thickness is equal to the offset or thickness value multiplied by the font em size.

Pixel 2

以像素表示的单位值。A unit value that is expressed in pixels.

示例

下面的示例演示如何将PenThicknessUnit属性设置为像素。The following example shows how to set the PenThicknessUnit property to Pixel.

// Move the text decoration lower using pixel value units.
myUnderline.PenOffset = 2;
myUnderline.PenOffsetUnit = TextDecorationUnit.Pixel;
myUnderline.PenThicknessUnit = TextDecorationUnit.Pixel;
' Move the text decoration lower using pixel value units.
myUnderline.PenOffset = 2
myUnderline.PenOffsetUnit = TextDecorationUnit.Pixel
myUnderline.PenThicknessUnit = TextDecorationUnit.Pixel
<!-- Move the text decoration lower using pixel value units. -->
<TextDecoration PenOffset="2" PenOffsetUnit="Pixel" PenThicknessUnit="Pixel" />

适用于