共用方式為


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 命名空間