TextDecoration.Location プロパティ

定義

文字装飾が描画される垂直位置を取得または設定します。

public:
 property System::Windows::TextDecorationLocation Location { System::Windows::TextDecorationLocation get(); void set(System::Windows::TextDecorationLocation value); };
public System.Windows.TextDecorationLocation Location { get; set; }
member this.Location : System.Windows.TextDecorationLocation with get, set
Public Property Location As TextDecorationLocation

プロパティ値

TextDecorationLocation

文字装飾が描画される垂直位置。

次のコード例では、ペンの純色ブラシを使用して取り消し線テキスト装飾を作成します。 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>

注釈

次の例では、テキストに対する相対的なテキスト装飾の位置を示します。

テキスト装飾位置のダイアグラム
テキスト装飾の種類の例

この PenOffset プロパティを使用すると、指定したテキスト装飾をオフセットできます Location

依存プロパティ情報

識別子フィールド LocationProperty
メタデータのプロパティが次に設定されている true なし

適用対象