ITextParagraphPropertiesFactoryService::Create Method (IFormattedLineSource^, TextFormattingRunProperties^, IMappingSpan^, IMappingPoint^, Int32)

 

Creates a TextParagraphProperties for the provided configuration.

Namespace:   Microsoft.VisualStudio.Text.Formatting
Assembly:  Microsoft.VisualStudio.Text.UI.Wpf (in Microsoft.VisualStudio.Text.UI.Wpf.dll)

TextParagraphProperties^ Create(
	IFormattedLineSource^ formattedLineSource,
	TextFormattingRunProperties^ textProperties,
	IMappingSpan^ line,
	IMappingPoint^ lineStart,
	int lineSegment
)

Parameters

formattedLineSource
Type: Microsoft.VisualStudio.Text.Formatting::IFormattedLineSource^

The IFormattedLineSource that is performing the formatting of the line. You can access useful properties about the ongoing formatting operation from this object.

textProperties
Type: Microsoft.VisualStudio.Text.Formatting::TextFormattingRunProperties^

The TextFormattingRunProperties of the line for which the TextParagraphProperties are provided. This parameter can be used to obtain formatting information about the textual contents of the line.

line
Type: Microsoft.VisualStudio.Text::IMappingSpan^

The IMappingSpan corresponding to the line that is being formatted or rendered.

lineStart
Type: Microsoft.VisualStudio.Text::IMappingPoint^

The IMappingPoint corresponding to the beginning of the line segment that is being formatted. This parameter is used in word-wrap scenarios where a single ITextSnapshotLine results in multiple formatted or rendered lines on the view.

lineSegment
Type: System::Int32

The segment number of the line segment that has been currently formatted. This is a zero-based index and is applicable to word-wrapped lines. If a line is word-wrapped into 4 segments, you will receive 4 calls for the line with line segments of 0, 1, 2, and 3.

Return Value

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

A TextParagraphProperties to be used when the line is being formatted.

You can return a TextFormattingParagraphProperties which has a convenient set of basic properties.

Return to top
Show: