TextDecoration.PenOffset 屬性

定義

取得或設定文字裝飾距其 Location 的位移 (Offset)。

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

屬性值

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使用 屬性來指定如何解譯此值的單位。

相依性屬性資訊

識別碼欄位 PenOffsetProperty
中繼資料屬性設定為 true

適用於

另請參閱