Location Property

TextDecoration.Location Property


Gets or sets the vertical location at which the text decoration is drawn.

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

member Location : TextDecorationLocation with get, set

Property Value

Type: System.Windows.TextDecorationLocation

The vertical location at which the text decoration is drawn.

The following example shows the locations of the text decorations relative to the text.

Diagram of text decoration locations

Example of text decoration types

The PenOffset property enables you to offset the text decoration from the specified Location.

Identifier field


Metadata properties set to true


In the following code example, a strikethrough text decoration is created with a solid color brush for the pen. The Location property is set to Strikethrough.

No code example is currently available or this language may not be supported.
<!-- Use the default font values for the strikethrough text decoration. -->
  FontSize="36" >
  The quick red fox

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft