IVsEditorAdaptersFactoryService.GetWpfTextViewHost 方法

获取文本视图适配器的文本视图宿主。

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

语法

声明
Function GetWpfTextViewHost ( _
    viewAdapter As IVsTextView _
) As IWpfTextViewHost
IWpfTextViewHost GetWpfTextViewHost(
    IVsTextView viewAdapter
)
IWpfTextViewHost^ GetWpfTextViewHost(
    IVsTextView^ viewAdapter
)
abstract GetWpfTextViewHost : 
        viewAdapter:IVsTextView -> IWpfTextViewHost
function GetWpfTextViewHost(
    viewAdapter : IVsTextView
) : IWpfTextViewHost

参数

  • viewAdapter
    类型:IVsTextView

    相关文本视图适配器。

返回值

类型:Microsoft.VisualStudio.Text.Editor.IWpfTextViewHost
适配器的 IWpfTextViewHost

异常

异常 条件
ArgumentNullException

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

ArgumentException

viewAdapter 未生成的由该工厂。

.NET Framework 安全性

请参阅

参考

IVsEditorAdaptersFactoryService 接口

Microsoft.VisualStudio.Editor 命名空间