为提供的配置创建 TextParagraphProperties。
命名空间: Microsoft.VisualStudio.Text.Formatting
程序集: Microsoft.VisualStudio.Text.UI.Wpf(在 Microsoft.VisualStudio.Text.UI.Wpf.dll 中)
语法
声明
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
参数
formattedLineSource
类型:Microsoft.VisualStudio.Text.Formatting.IFormattedLineSource执行一行的格式化 IFormattedLineSource 。 可以从此对象访问有关正在进行的格式设置操作的有用属性。
textProperties
类型:Microsoft.VisualStudio.Text.Formatting.TextFormattingRunPropertiesTextParagraphProperties 提供行的 TextFormattingRunProperties 。 此参数可用于获取有关行的文本内容的格式设置信息。
line
类型:Microsoft.VisualStudio.Text.IMappingSpan与要设置格式或呈现的行对应的 IMappingSpan 。
lineStart
类型:Microsoft.VisualStudio.Text.IMappingPoint与要设置格式的行段开头的相应 IMappingPoint 。 此参数用于唯一 ITextSnapshotLine 导致在视图中多种格式的或呈现的行的自动换行方案。
lineSegment
类型:Int32当前设置格式的行段段号。 这是从零开始的索引,适用于自动换行的行。 如果行自动换行为 4 段,您将收到 4 要求与线段的行 0, 1, 2 和 3。
返回值
类型:TextParagraphProperties
要在设置行格式时使用的 TextParagraphProperties。
备注
有一种方便设置基本属性可返回 TextFormattingParagraphProperties 。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。