ITextEditorFactoryService.CreateTextView 方法 (ITextBuffer, ITextViewRoleSet, IEditorOptions)

创建显示指定的文本缓冲区的内容的 IWpfTextView

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

语法

声明
Function CreateTextView ( _
    textBuffer As ITextBuffer, _
    roles As ITextViewRoleSet, _
    parentOptions As IEditorOptions _
) As IWpfTextView
IWpfTextView CreateTextView(
    ITextBuffer textBuffer,
    ITextViewRoleSet roles,
    IEditorOptions parentOptions
)
IWpfTextView^ CreateTextView(
    ITextBuffer^ textBuffer, 
    ITextViewRoleSet^ roles, 
    IEditorOptions^ parentOptions
)
abstract CreateTextView : 
        textBuffer:ITextBuffer * 
        roles:ITextViewRoleSet * 
        parentOptions:IEditorOptions -> IWpfTextView
function CreateTextView(
    textBuffer : ITextBuffer, 
    roles : ITextViewRoleSet, 
    parentOptions : IEditorOptions
) : IWpfTextView

参数

返回值

类型:Microsoft.VisualStudio.Text.Editor.IWpfTextView
一个 IWpfTextView

异常

异常 条件
ArgumentNullException

textBuffer 或 roles 或 parentOptions 为空。

备注

ITextBuffer 在多个视图中显示。 trivial ITextDataModel 将构造,并 ITextViewModel 将构造基于 textBuffer 和 roles的 IContentType

.NET Framework 安全性

请参阅

参考

ITextEditorFactoryService 接口

CreateTextView 重载

Microsoft.VisualStudio.Text.Editor 命名空间