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