ITextParagraphPropertiesFactoryService.Create Method
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)
Syntax
'Déclaration
Function Create ( _
formattedLineSource As IFormattedLineSource, _
textProperties As TextFormattingRunProperties, _
line As IMappingSpan, _
lineStart As IMappingPoint, _
lineSegment As Integer _
) As TextParagraphProperties
TextParagraphProperties Create(
IFormattedLineSource formattedLineSource,
TextFormattingRunProperties textProperties,
IMappingSpan line,
IMappingPoint lineStart,
int lineSegment
)
TextParagraphProperties^ Create(
IFormattedLineSource^ formattedLineSource,
TextFormattingRunProperties^ textProperties,
IMappingSpan^ line,
IMappingPoint^ lineStart,
int lineSegment
)
abstract Create :
formattedLineSource:IFormattedLineSource *
textProperties:TextFormattingRunProperties *
line:IMappingSpan *
lineStart:IMappingPoint *
lineSegment:int -> TextParagraphProperties
function Create(
formattedLineSource : IFormattedLineSource,
textProperties : TextFormattingRunProperties,
line : IMappingSpan,
lineStart : IMappingPoint,
lineSegment : int
) : TextParagraphProperties
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.
Remarks
You can return a TextFormattingParagraphProperties which has a convenient set of basic properties.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.