Paragraph.TextDecorations Egenskap
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Hämtar eller anger en TextDecorationCollection som innehåller textdekorationer som ska tillämpas på det här elementet.
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
Egenskapsvärde
En TextDecorationCollection samling som innehåller textdekorationer som ska tillämpas på det här elementet. Värdet null innebär att inga textdekorationer tillämpas. Standardvärdet är null.
Exempel
I följande exempel visas hur du anger egenskapen TextDecorations för en 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
Följande bild visar hur det här exemplet återges.
Följande siffror visar hur Overline, Baselineoch Understrykning dekorationer återges.
Kommentarer
Ett TextDecoration objekt är en visuell utsmyckning som du kan lägga till i text. Det finns fyra typer av textdekorationer: understrykning, baslinje, genomstrykning och överstreck. Mer information om textdekorationer finns i Så här skapar du en textdekoration.
Information om beroendeegenskap
| Objekt | Value |
|---|---|
| Identifierarfält | TextDecorationsProperty |
Metadataegenskaper inställda på true |
AffectsRender |