共用方式為


ITextEditorFactoryService 介面

建立編輯器檢視。

命名空間:  Microsoft.VisualStudio.Text.Editor
組件:  Microsoft.VisualStudio.Text.UI.Wpf (在 Microsoft.VisualStudio.Text.UI.Wpf.dll 中)

語法

'宣告
Public Interface ITextEditorFactoryService
public interface ITextEditorFactoryService
public interface class ITextEditorFactoryService
type ITextEditorFactoryService =  interface end
public interface ITextEditorFactoryService

ITextEditorFactoryService 類型會公開下列成員。

屬性

  名稱 描述
公用屬性 AllPredefinedRoles 所有預先定義的文字檢視角色集。
公用屬性 DefaultRoles 建立文字檢視,但未指定文字檢視角色時要使用的角色組。
公用屬性 NoRoles 空白的文字檢視角色集。

回頁首

方法

  名稱 描述
公用方法 CreateTextView() 會建立IWpfTextView上新建ITextBuffer有 「 文字 」 的內容類型。
公用方法 CreateTextView(ITextBuffer) 會建立IWpfTextView ,會顯示指定的文字緩衝區的內容。
公用方法 CreateTextView(ITextBuffer, ITextViewRoleSet) 會建立IWpfTextView ,會顯示指定的文字緩衝區的內容。
公用方法 CreateTextView(ITextBuffer, ITextViewRoleSet, IEditorOptions) 會建立IWpfTextView ,會顯示指定的文字緩衝區的內容。
公用方法 CreateTextView(ITextDataModel, ITextViewRoleSet, IEditorOptions) 會建立IWpfTextView所顯示的資料模型內容。
公用方法 CreateTextView(ITextViewModel, ITextViewRoleSet, IEditorOptions) 會建立IWpfTextView ,會顯示指定的檢視模式的內容。
公用方法 CreateTextViewHost 建立文字檢視的主機。
公用方法 CreateTextViewRoleSet(IEnumerable<String>) 建立包含指定角色的 ITextViewRoleSet
公用方法 CreateTextViewRoleSet(array<String[]) 建立包含指定角色的 ITextViewRoleSet

回頁首

事件

  名稱 描述
公用事件 TextViewCreated 時引發ITextView就會建立。

回頁首

備註

這是 MEF 元件的組件,並應該匯入,如下所示:

[Import] ITextEditorFactoryService factory = null;

請參閱

參考

Microsoft.VisualStudio.Text.Editor 命名空間