FormattedText.SetTextDecorations Metod
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.
TextDecorationCollection Anger objektets FormattedText för.
Överlagringar
| Name | Description |
|---|---|
| SetTextDecorations(TextDecorationCollection) |
TextDecorationCollection Anger för hela uppsättningen tecken i FormattedText objektet. |
| SetTextDecorations(TextDecorationCollection, Int32, Int32) |
Anger för angiven TextDecorationCollection text i ett FormattedText objekt. |
SetTextDecorations(TextDecorationCollection)
TextDecorationCollection Anger för hela uppsättningen tecken i FormattedText objektet.
public:
void SetTextDecorations(System::Windows::TextDecorationCollection ^ textDecorations);
public void SetTextDecorations(System.Windows.TextDecorationCollection textDecorations);
member this.SetTextDecorations : System.Windows.TextDecorationCollection -> unit
Public Sub SetTextDecorations (textDecorations As TextDecorationCollection)
Parametrar
- textDecorations
- TextDecorationCollection
Att TextDecorationCollection tillämpa på texten.
Kommentarer
Klassen TextDecorationCollection anger vilka typer av textdekorationer som ska tillämpas på texten. Det finns fyra typer av textdekorationer: understrykning, baslinje, genomstrykning och överstreck. Dessa beskrivs som TextDecorationLocation värden som anges för varje objekt i TextDecorationCollection. Det är vanligt att TextDecorationCollection samlingen endast innehåller en dekoration, men egenskapen använder samlingen för att ge mer avancerade dekorationseffekter genom att tillämpa flera dekorationer på samma text.
Följande bild visar platserna för textdekorationerna i förhållande till texten.
Exempel på textdekorationstyper
Den här metoden anger TextDecorationCollection för hela textsträngen. Om du vill ange TextDecorationCollection för en delmängd av textsträngen SetTextDecorations(TextDecorationCollection, Int32, Int32) använder du metoden .
Gäller för
SetTextDecorations(TextDecorationCollection, Int32, Int32)
Anger för angiven TextDecorationCollection text i ett FormattedText objekt.
public:
void SetTextDecorations(System::Windows::TextDecorationCollection ^ textDecorations, int startIndex, int count);
public void SetTextDecorations(System.Windows.TextDecorationCollection textDecorations, int startIndex, int count);
member this.SetTextDecorations : System.Windows.TextDecorationCollection * int * int -> unit
Public Sub SetTextDecorations (textDecorations As TextDecorationCollection, startIndex As Integer, count As Integer)
Parametrar
- textDecorations
- TextDecorationCollection
Att TextDecorationCollection tillämpa på texten.
- startIndex
- Int32
Startindexet för det inledande tecknet som textdekorationerna ska tillämpas på.
- count
- Int32
Antalet tecken som textdekorationerna ska användas på.
Kommentarer
Klassen TextDecorationCollection anger vilka typer av textdekorationer som ska tillämpas på texten. Det finns fyra typer av textdekorationer: understrykning, baslinje, genomstrykning och överstreck. Dessa beskrivs som TextDecorationLocation värden som anges för varje objekt i TextDecorationCollection. Det är vanligt att TextDecorationCollection samlingen endast innehåller en dekoration, men egenskapen använder samlingen för att ge mer avancerade dekorationseffekter genom att tillämpa flera dekorationer på samma text.
Följande bild visar platserna för textdekorationerna i förhållande till texten.
Exempel på textdekorationstyper
Om du vill ange TextDecorationCollection för hela textsträngen SetTextDecorations(TextDecorationCollection) använder du metoden .