TextDecoration.PenThicknessUnit Property

Definition

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

C#
public System.Windows.TextDecorationUnit PenThicknessUnit { get; set; }

Property Value

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

Examples

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

C#
// Move the text decoration lower using pixel value units.
myUnderline.PenOffset = 2;
myUnderline.PenOffsetUnit = TextDecorationUnit.Pixel;
myUnderline.PenThicknessUnit = TextDecorationUnit.Pixel;
XAML
<!-- Move the text decoration lower using pixel value units. -->
<TextDecoration PenOffset="2" PenOffsetUnit="Pixel" PenThicknessUnit="Pixel" />

Remarks

Dependency Property Information

Item Value
Identifier field PenThicknessUnitProperty
Metadata properties set to true None

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9