Condividi tramite


TextDecorations.Strikethrough Proprietà

Definizione

Specifica un barrato 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

Valore della proprietà

Valore che rappresenta un barrato TextDecoration.

Esempio

Nell'esempio seguente viene creata una decorazione di testo barrato usando il pennello a tinta unita per la penna. La proprietà Location è impostata su 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>

Commenti

Nell'esempio seguente viene illustrata la posizione di una decorazione di testo barrato rispetto al testo.

Diagramma delle posizioni delle decorazioni del testo Diagramma Esempio di decorazione di testo barrato

Si applica a