FormattedText.SetTextDecorations Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee stelt u het TextDecorationCollection voor het FormattedText object in.
Overloads
| Name | Description |
|---|---|
| SetTextDecorations(TextDecorationCollection) |
Hiermee stelt u de TextDecorationCollection voor de volledige set tekens in het FormattedText object in. |
| SetTextDecorations(TextDecorationCollection, Int32, Int32) |
Hiermee stelt u de TextDecorationCollection voor opgegeven tekst in een FormattedText object in. |
SetTextDecorations(TextDecorationCollection)
Hiermee stelt u de TextDecorationCollection voor de volledige set tekens in het FormattedText object in.
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)
Parameters
- textDecorations
- TextDecorationCollection
De TextDecorationCollection toe te passen op de tekst.
Opmerkingen
De TextDecorationCollection klasse geeft de typen tekstdecoraties op die op de tekst moeten worden toegepast. Er zijn vier soorten tekstdecoraties: onderstrepen, basislijn, doorhalen en overline. Deze worden beschreven als TextDecorationLocation waarden die voor elk item in het TextDecorationCollectionitem zijn ingesteld. Het is gebruikelijk dat de TextDecorationCollection collectie slechts één decoratie bevat, maar de eigenschap gebruikt de collectie om meer geavanceerde decoratie-effecten te bieden door meerdere decoraties toe te passen op dezelfde tekst.
In de volgende afbeelding ziet u de locaties van de tekstversieringen ten opzichte van de tekst.
Voorbeeld van tekstversieringstypen
Met deze methode wordt de TextDecorationCollection voor de hele tekenreeks ingesteld. Als u de TextDecorationCollection voor een subset van de tekenreeks wilt instellen, gebruikt u de SetTextDecorations(TextDecorationCollection, Int32, Int32) methode.
Van toepassing op
SetTextDecorations(TextDecorationCollection, Int32, Int32)
Hiermee stelt u de TextDecorationCollection voor opgegeven tekst in een FormattedText object in.
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)
Parameters
- textDecorations
- TextDecorationCollection
De TextDecorationCollection toe te passen op de tekst.
- startIndex
- Int32
De beginindex van het eerste teken om de tekstdecoraties toe te passen.
- count
- Int32
Het aantal tekens om de tekstversieringen toe te passen.
Opmerkingen
De TextDecorationCollection klasse geeft de typen tekstdecoraties op die op de tekst moeten worden toegepast. Er zijn vier soorten tekstdecoraties: onderstrepen, basislijn, doorhalen en overline. Deze worden beschreven als TextDecorationLocation waarden die voor elk item in het TextDecorationCollectionitem zijn ingesteld. Het is gebruikelijk dat de TextDecorationCollection collectie slechts één decoratie bevat, maar de eigenschap gebruikt de collectie om meer geavanceerde decoratie-effecten te bieden door meerdere decoraties toe te passen op dezelfde tekst.
In de volgende afbeelding ziet u de locaties van de tekstversieringen ten opzichte van de tekst.
Voorbeeld van tekstversieringstypen
Als u de TextDecorationCollection tekenreeks voor de hele tekenreeks wilt instellen, gebruikt u de SetTextDecorations(TextDecorationCollection) methode.