Paragraph.TextDecorations プロパティ

定義

この要素に適用する文字装飾を格納する TextDecorationCollection を取得または設定します。

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

プロパティ値

TextDecorationCollection

この要素に適用する文字装飾を格納する TextDecorationCollection コレクション。 null 値は、文字装飾が適用されないことを意味します。 既定値は null です。

TextDecorationsParagraph プロパティを設定する方法を次の例に示します。

<FlowDocument ColumnWidth="200">
  <Paragraph TextDecorations="Strikethrough">
    This text will render with the strikethrough effect.
  </Paragraph>
</FlowDocument>
Paragraph parx = new Paragraph(new Run("This text will render with the strikethrough effect."));
parx.TextDecorations = TextDecorations.Strikethrough;
Dim parx As New Paragraph(New Run("This text will render with the strikethrough effect."))
parx.TextDecorations = TextDecorations.Strikethrough

この例の表示結果を次の図に示します。

スクリーンショット: 既定の取り消し線の効果が適用されたテキスト

次の図には、それぞれ 上線ベースライン下線 の各装飾がどのようにレンダリングされるかが示されています。

スクリーンショット: TextDecorator の上に線を引く

スクリーンショット: テキストに対する既定のベースライン効果

スクリーンショット: 既定の下線の効果が適用されたテキスト

注釈

TextDecoration オブジェクトは、テキストに追加できるビジュアルな装飾です。 文字の装飾には、下線、ベースライン、取り消し線、上線の 4 種類があります。 テキスト装飾の詳細については、「 方法: テキスト装飾を作成する」を参照してください。

依存プロパティ情報

識別子フィールド TextDecorationsProperty
に設定されたメタデータ プロパティ true AffectsRender

適用対象