Gets or sets the vertical location at which the text decoration is drawn.
Assembly: PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
The following example shows the locations of the text decorations relative to the text.
The PenOffset property enables you to offset the text decoration from the specified .
In the following code example, a strikethrough text decoration is created with a solid color brush for the pen. The property is set to Strikethrough.
' Use the default font values for the strikethrough text decoration. Private Sub SetDefaultStrikethrough() ' Set the underline decoration directly to the text block. TextBlock1.TextDecorations = TextDecorations.Strikethrough End Sub