TextFormatter.FormatLine 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 maakt u een TextLine bestand dat wordt gebruikt voor het opmaken en weergeven van documentinhoud.
Overloads
| Name | Description |
|---|---|
| FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak) |
Hiermee maakt u een TextLine bestand dat wordt gebruikt voor het opmaken en weergeven van documentinhoud. |
| FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak, TextRunCache) |
Hiermee maakt u een TextLine bestand dat wordt gebruikt voor het opmaken en weergeven van documentinhoud. |
FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak)
Hiermee maakt u een TextLine bestand dat wordt gebruikt voor het opmaken en weergeven van documentinhoud.
public:
abstract System::Windows::Media::TextFormatting::TextLine ^ FormatLine(System::Windows::Media::TextFormatting::TextSource ^ textSource, int firstCharIndex, double paragraphWidth, System::Windows::Media::TextFormatting::TextParagraphProperties ^ paragraphProperties, System::Windows::Media::TextFormatting::TextLineBreak ^ previousLineBreak);
public abstract System.Windows.Media.TextFormatting.TextLine FormatLine(System.Windows.Media.TextFormatting.TextSource textSource, int firstCharIndex, double paragraphWidth, System.Windows.Media.TextFormatting.TextParagraphProperties paragraphProperties, System.Windows.Media.TextFormatting.TextLineBreak previousLineBreak);
abstract member FormatLine : System.Windows.Media.TextFormatting.TextSource * int * double * System.Windows.Media.TextFormatting.TextParagraphProperties * System.Windows.Media.TextFormatting.TextLineBreak -> System.Windows.Media.TextFormatting.TextLine
Public MustOverride Function FormatLine (textSource As TextSource, firstCharIndex As Integer, paragraphWidth As Double, paragraphProperties As TextParagraphProperties, previousLineBreak As TextLineBreak) As TextLine
Parameters
- textSource
- TextSource
Een TextSource waarde die de tekstbron voor de regel vertegenwoordigt.
- paragraphProperties
- TextParagraphProperties
Een TextParagraphProperties waarde die alinea-eigenschappen vertegenwoordigt, zoals stroomrichting, uitlijning of inspringing.
- previousLineBreak
- TextLineBreak
Een TextLineBreak waarde die de status van de tekstopmaak aangeeft, wat betreft de plaats waar de vorige regel in de alinea is verbroken door het tekstopmaakproces.
Retouren
Een TextLine waarde die een tekstregel vertegenwoordigt die kan worden weergegeven.
Voorbeelden
In het volgende voorbeeld ziet u hoe u de FormatLine methode gebruikt om een opgemaakte TextLinewaarde te retourneren.
// Create a textline from the text store using the TextFormatter object.
TextLine myTextLine = formatter.FormatLine(
customTextSource,
0,
400,
customTextParagraphProperties,
null);
// Draw the formatted text into the drawing context.
myTextLine.Draw(drawingContext, new Point(0, 0), InvertAxes.None);
' Create a textline from the text store using the TextFormatter object.
Dim myTextLine As TextLine = formatter.FormatLine(customTextSource, 0, 400, customTextParagraphProperties, Nothing)
' Draw the formatted text into the drawing context.
myTextLine.Draw(drawingContext, New Point(0, 0), InvertAxes.None)
Van toepassing op
FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak, TextRunCache)
Hiermee maakt u een TextLine bestand dat wordt gebruikt voor het opmaken en weergeven van documentinhoud.
public:
abstract System::Windows::Media::TextFormatting::TextLine ^ FormatLine(System::Windows::Media::TextFormatting::TextSource ^ textSource, int firstCharIndex, double paragraphWidth, System::Windows::Media::TextFormatting::TextParagraphProperties ^ paragraphProperties, System::Windows::Media::TextFormatting::TextLineBreak ^ previousLineBreak, System::Windows::Media::TextFormatting::TextRunCache ^ textRunCache);
public abstract System.Windows.Media.TextFormatting.TextLine FormatLine(System.Windows.Media.TextFormatting.TextSource textSource, int firstCharIndex, double paragraphWidth, System.Windows.Media.TextFormatting.TextParagraphProperties paragraphProperties, System.Windows.Media.TextFormatting.TextLineBreak previousLineBreak, System.Windows.Media.TextFormatting.TextRunCache textRunCache);
abstract member FormatLine : System.Windows.Media.TextFormatting.TextSource * int * double * System.Windows.Media.TextFormatting.TextParagraphProperties * System.Windows.Media.TextFormatting.TextLineBreak * System.Windows.Media.TextFormatting.TextRunCache -> System.Windows.Media.TextFormatting.TextLine
Public MustOverride Function FormatLine (textSource As TextSource, firstCharIndex As Integer, paragraphWidth As Double, paragraphProperties As TextParagraphProperties, previousLineBreak As TextLineBreak, textRunCache As TextRunCache) As TextLine
Parameters
- textSource
- TextSource
Een TextSource object dat de tekstbron voor de regel vertegenwoordigt.
- paragraphProperties
- TextParagraphProperties
Een TextParagraphProperties object dat alinea-eigenschappen vertegenwoordigt, zoals stroomrichting, uitlijning of inspringing.
- previousLineBreak
- TextLineBreak
Een TextLineBreak object dat de tekstopmaakstatus aangeeft, in termen van waar de vorige regel in de alinea is verbroken door het tekstopmaakproces.
- textRunCache
- TextRunCache
Een TextRunCache object dat het cachemechanisme vertegenwoordigt voor de indeling van tekst.
Retouren
Een TextLine waarde die een tekstregel vertegenwoordigt die kan worden weergegeven.
Opmerkingen
Deze methode wordt gebruikt om de prestaties in toepassingen te verbeteren waarbij de TextLine prestaties aanzienlijke gevolgen hebben.