获取文本视图适配器的文本视图宿主。
命名空间: 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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。