TextDecoration.PenThicknessUnit Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the units in which the Thickness of the text decoration's Pen is expressed.

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

public TextDecorationUnit PenThicknessUnit { get; set; }

Property Value

Type: System.Windows.TextDecorationUnit

The units in which the Thickness of the text decoration's Pen is expressed. The default is TextDecorationUnit.FontRecommended.

Identifier field

PenThicknessUnitProperty

Metadata properties set to true

None

The following code example shows how to set the PenThicknessUnit 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: