共用方式為


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

適用於