Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TextFormatter.FormatLine Method (TextSource, Int32, Double, TextParagraphProperties, TextLineBreak, TextRunCache)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Creates a TextLine that is used for formatting and displaying document content.

Namespace:   System.Windows.Media.TextFormatting
Assembly:  PresentationCore (in PresentationCore.dll)

public abstract TextLine FormatLine(
	TextSource textSource,
	int firstCharIndex,
	double paragraphWidth,
	TextParagraphProperties paragraphProperties,
	TextLineBreak previousLineBreak,
	TextRunCache textRunCache
)

Parameters

textSource
Type: System.Windows.Media.TextFormatting.TextSource

A TextSource object that represents the text source for the line.

firstCharIndex
Type: System.Int32

An Int32 value that specifies the character index of the starting character in the line.

paragraphWidth
Type: System.Double

A Double value that specifies the width of the paragraph that the line fills.

paragraphProperties
Type: System.Windows.Media.TextFormatting.TextParagraphProperties

A TextParagraphProperties object that represents paragraph properties, such as flow direction, alignment, or indentation.

previousLineBreak
Type: System.Windows.Media.TextFormatting.TextLineBreak

A TextLineBreak object that specifies the text formatter state, in terms of where the previous line in the paragraph was broken by the text formatting process.

textRunCache
Type: System.Windows.Media.TextFormatting.TextRunCache

A TextRunCache object that represents the caching mechanism for the layout of text.

Return Value

Type: System.Windows.Media.TextFormatting.TextLine

A TextLine value that represents a line of text that can be displayed.

This method is used to improve performance in applications where the TextLine has significant performance implications.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft