ITextEditorFactoryService.CreateTextView 方法 (ITextBuffer)

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

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

语法

声明
Function CreateTextView ( _
    textBuffer As ITextBuffer _
) As IWpfTextView
IWpfTextView CreateTextView(
    ITextBuffer textBuffer
)
IWpfTextView^ CreateTextView(
    ITextBuffer^ textBuffer
)
abstract CreateTextView : 
        textBuffer:ITextBuffer -> IWpfTextView
function CreateTextView(
    textBuffer : ITextBuffer
) : IWpfTextView

参数

返回值

类型:Microsoft.VisualStudio.Text.Editor.IWpfTextView
一个具有所有预定义文本视图角色的 IWpfTextView

异常

异常 条件
ArgumentNullException

textBuffer 为 nullnull 引用(在 Visual Basic 中为 Nothing)。

备注

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

.NET Framework 安全性

请参阅

参考

ITextEditorFactoryService 接口

CreateTextView 重载

Microsoft.VisualStudio.Text.Editor 命名空间