Inline.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 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.
Standardvärdet är null (inga textdekorationer används).
Exempel
I följande exempel visas hur du anger attributet för TextDecorations ett Inline element (Run).
<FlowDocument ColumnWidth="200">
<Paragraph>
<Run TextDecorations="Strikethrough">
This text will render with the strikethrough effect.
</Run>
</Paragraph>
</FlowDocument>
Följande bild visar hur det här exemplet återges.
Följande siffror visar hur Overline, Baselineoch Understrykning dekorationer återges.
I följande exempel visas hur du ställer in TextDecorations-egenskapen programmatiskt.
Run run1 = new Run("This text will render with the strikethrough effect.");
run1.TextDecorations = TextDecorations.Strikethrough;
Dim run1 As New Run("This text will render with the strikethrough effect.")
run1.TextDecorations = TextDecorations.Strikethrough
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 |