Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

TextDecorationUnit Enumeration

Specifies the unit type of a TextDecoration pen offset or pen thickness value.

Namespace: System.Windows
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public enum TextDecorationUnit
public enum TextDecorationUnit
public enum TextDecorationUnit
<object property="EnumerationValue" .../>
 Member nameDescription
FontRecommendedDefault. A unit value that is relative to the font used for the TextDecoration. If the decoration spans multiple fonts, an average recommended value is calculated.  
FontRenderingEmSizeA unit value that is relative to the em size of the font. The value of the offset or thickness is equal to the offset or thickness value multiplied by the font em size. 
PixelA unit value that is expressed in pixels. 

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

<!-- Move the text decoration lower using pixel value units. -->
<TextDecoration PenOffset="2" PenOffsetUnit="Pixel" PenThicknessUnit="Pixel" />

// Move the text decoration lower using pixel value units.
myUnderline.PenOffset = 2;
myUnderline.PenOffsetUnit = TextDecorationUnit.Pixel;
myUnderline.PenThicknessUnit = TextDecorationUnit.Pixel;

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.