Partage via


TextDecorations.Strikethrough Propriété

Définition

Spécifie un TextDecoration barré.

public:
 static property System::Windows::TextDecorationCollection ^ Strikethrough { System::Windows::TextDecorationCollection ^ get(); };
public static System.Windows.TextDecorationCollection Strikethrough { get; }
member this.Strikethrough : System.Windows.TextDecorationCollection
Public Shared ReadOnly Property Strikethrough As TextDecorationCollection

Valeur de propriété

TextDecorationCollection

Valeur qui représente un TextDecoration barré.

Exemples

Dans l’exemple suivant, une décoration de texte de frappe est créée à l’aide d’un pinceau de couleur unie pour le stylet. La propriété Location est définie sur 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>

Remarques

L’exemple suivant montre l’emplacement d’une décoration de texte de frappe par rapport au texte.

Diagramme des emplacements de décoration de texte
Exemple d’une décoration de texte de frappe

S’applique à