TextDecorations.Strikethrough プロパティ

定義

取り消し線の TextDecoration を指定します。

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

プロパティ値

TextDecorationCollection

取り消し線の TextDecoration を表す値。

次の例では、ペンに単色のブラシを使用して、取り消し線のテキスト装飾を作成します。 Location プロパティが 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>

注釈

次の例は、テキストに対する取り消し線テキスト装飾の位置を示しています。

テキスト装飾位置のダイアグラム
取り消し線テキストの装飾の例

適用対象