TextDecoration.PenOffsetUnit Property

 

Gets the units in which the PenOffset value is expressed.

Namespace:   System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)

public TextDecorationUnit PenOffsetUnit { get; set; }

Property Value

Type: System.Windows.TextDecorationUnit

The units in which the PenOffset value is expressed. The default is TextDecorationUnit.FontRecommended.

Identifier field

PenOffsetUnitProperty

Metadata properties set to true

None

The following code example shows how to set the PenOffsetUnit property.

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

.NET Framework
Available since 3.0
Return to top
Show: