TextDecoration.PenOffsetUnit 属性

定义

获取用于表示 PenOffset 值的单位。

public:
 property System::Windows::TextDecorationUnit PenOffsetUnit { System::Windows::TextDecorationUnit get(); void set(System::Windows::TextDecorationUnit value); };
public System.Windows.TextDecorationUnit PenOffsetUnit { get; set; }
member this.PenOffsetUnit : System.Windows.TextDecorationUnit with get, set
Public Property PenOffsetUnit As TextDecorationUnit

属性值

TextDecorationUnit

用于表示 PenOffset 值的单位。 默认值为 FontRecommended

示例

下面的代码示例演示如何设置 PenOffsetUnit 属性。

// 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" />

注解

依赖项属性信息

标识符字段 PenOffsetUnitProperty
元数据属性设置为 true

适用于