IRtfBuilderService.GenerateRtf 方法 (NormalizedSnapshotSpanCollection, ITextView)

获取一个包含范围的格式化文本的 RTF 字符串。

命名空间:  Microsoft.VisualStudio.Text.Formatting
程序集:  Microsoft.VisualStudio.Text.UI.Wpf(在 Microsoft.VisualStudio.Text.UI.Wpf.dll 中)

语法

声明
Function GenerateRtf ( _
    spans As NormalizedSnapshotSpanCollection, _
    textView As ITextView _
) As String
string GenerateRtf(
    NormalizedSnapshotSpanCollection spans,
    ITextView textView
)
String^ GenerateRtf(
    NormalizedSnapshotSpanCollection^ spans, 
    ITextView^ textView
)
abstract GenerateRtf : 
        spans:NormalizedSnapshotSpanCollection * 
        textView:ITextView -> string
function GenerateRtf(
    spans : NormalizedSnapshotSpanCollection, 
    textView : ITextView
) : String

参数

返回值

类型:String
RTF 数据。

备注

生成的 RTF 基于文本的快照范围的序列结构,与 textView属性和格式设置属性。

所有快照范围必须属于 textView。 一个新行 “\ par” rtf 关键字将放置在提供的 SnapshotSpans. 之间。

.NET Framework 安全性

请参阅

参考

IRtfBuilderService 接口

GenerateRtf 重载

Microsoft.VisualStudio.Text.Formatting 命名空间