Paragraph.TextDecorations Proprietà

Definizione

Ottiene o imposta un oggetto TextDecorationCollection contenente le decorazioni di testo da applicare a questo elemento.

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

Valore della proprietà

TextDecorationCollection

Oggetto TextDecorationCollection contenente le decorazioni di testo da applicare a questo elemento. Il valore null significa che non verranno applicate decorazioni di testo. Il valore predefinito è null.

Esempio

Nell'esempio seguente viene illustrato come impostare la proprietà TextDecorations di un oggetto Paragraph.

<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

La figura seguente illustra il rendering di questo esempio.

Schermata: testo con effetto Strikethrough predefinito

Le figure seguenti illustrano rispettivamente il rendering delle decorazioni Overline, Baseline e Sottolineatura .

Schermata: TextDecorator Overline

Schermata: effetto Baseline predefinito sul testo

Schermata: testo con effetto Underline predefinito

Commenti

Un TextDecoration oggetto è un ornamento visivo che è possibile aggiungere al testo. Esistono quattro tipi di decorazioni di testo: sottolineatura, baseline, barratura e overline. Per altre informazioni sulle decorazioni di testo, vedere Procedura: Creare una decorazione di testo.

Informazioni proprietà di dipendenza

Campo Identificatore TextDecorationsProperty
Proprietà dei metadati impostate su true AffectsRender

Si applica a