通过


TextDecoration.PenOffset 属性

定义

获取或设置文本修饰的 Location偏移量。

public:
 property double PenOffset { double get(); void set(double value); };
public double PenOffset { get; set; }
member this.PenOffset : double with get, set
Public Property PenOffset As Double

属性值

文本修饰的 Location偏移量。 默认值为 0。

示例

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

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

注解

负值将文本修饰向上移动,而正值将文本修饰下移。 使用 PenOffsetUnit 属性指定如何解释此值的单位。

Dependency 属性信息

物品 价值
标识符字段 PenOffsetProperty
元数据属性设置为 true 没有

适用于

另请参阅