TextDecorations.Strikethrough Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies a strikethrough TextDecoration.
public:
static property System::Windows::TextDecorationCollection ^ Strikethrough { System::Windows::TextDecorationCollection ^ get(); };
public static System.Windows.TextDecorationCollection Strikethrough { get; }
static member Strikethrough : System.Windows.TextDecorationCollection
Public Shared ReadOnly Property Strikethrough As TextDecorationCollection
Property Value
A value that represents a strikethrough TextDecoration.
Examples
In the following example, a strikethrough text decoration is created by using solid color brush for the pen. The Location property is set to Strikethrough.
// Use the default font values for the strikethrough text decoration.
private void SetDefaultStrikethrough()
{
// Set the underline decoration directly to the text block.
TextBlock1.TextDecorations = TextDecorations.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
<!-- Use the default font values for the strikethrough text decoration. -->
<TextBlock
TextDecorations="Strikethrough"
FontSize="36" >
The quick red fox
</TextBlock>
Remarks
The following example shows the location of a strikethrough text decoration relative to the text.
Example of a strikethrough text decoration