IVsEditorAdaptersFactoryService.GetWpfTextView 方法

获取文本视图适配器的 WPF 文本视图。

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

语法

声明
Function GetWpfTextView ( _
    viewAdapter As IVsTextView _
) As IWpfTextView
IWpfTextView GetWpfTextView(
    IVsTextView viewAdapter
)
IWpfTextView^ GetWpfTextView(
    IVsTextView^ viewAdapter
)
abstract GetWpfTextView : 
        viewAdapter:IVsTextView -> IWpfTextView
function GetWpfTextView(
    viewAdapter : IVsTextView
) : IWpfTextView

参数

  • viewAdapter
    类型:IVsTextView

    相关文本视图适配器。

返回值

类型:Microsoft.VisualStudio.Text.Editor.IWpfTextView
IWpfTextView 存在的 UI 的文本或 nullnull 引用(在 Visual Basic 中为 Nothing) ,如果调用此方法,在为适配器建立内容之前的。

异常

异常 条件
ArgumentNullException

viewAdapter 为 null。

ArgumentException

viewAdapter 未生成的由该工厂。

.NET Framework 安全性

请参阅

参考

IVsEditorAdaptersFactoryService 接口

Microsoft.VisualStudio.Editor 命名空间