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


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


Type: System.Windows.Media.TextFormatting.TextSource

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

Type: System.Int32

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

Type: System.Double

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

Type: System.Windows.Media.TextFormatting.TextParagraphProperties

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

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.

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