語言

IExpressionEditorService 介面

定義

建立或關閉表達式編輯器。

public interface class IExpressionEditorService
public interface IExpressionEditorService
type IExpressionEditorService = interface
Public Interface IExpressionEditorService

備註

表達式編輯器是 Visual Basic 的一個控制項,用於在 Visual Studio 中編輯表達式。 此控制項提供完整的 IDE 編輯體驗,包括 IntelliSense、著色、ParamInfo、錯誤曲線等多項功能。

它們 IExpressionEditorService 也可用來管理自訂表達式編輯器的實例。 要註冊自訂表達式編輯器,您必須使用以下程式碼發佈:IExpressionEditorService

this.expressionEditorService = new ExpressionEditorService();

this.workflowDesigner.Context.Services.Publish<IExpressionEditorService>(this.expressionEditorService);

當一個 ExpressionTextBox 實例獲得焦點,且在失去有效表達式焦點或重新載入設計者時,會被摧毀表達式編輯器。

預設的表達式編輯器無法用於重新託管的應用程式。 如果在重新主機的應用程式中使用預設表達式編輯器,則會有一個文字框可供編輯。 然而,自訂表達式編輯器可以在重新主機的應用程式中使用,方法是在應用程式中發佈。IExpressionEditorService

如果你在自訂活動設計器中使用 ExpressionTextBox 控制項,則不必在此介面中建立與銷毀表達式編輯器。 ExpressionTextBox班級會幫你處理這些。

方法

名稱 Description
CloseExpressionEditors()

關閉所有活躍的表達式編輯器。

CreateExpressionEditor(AssemblyContextControlItem, ImportedNamespaceContextItem, List<ModelItem>, String, Size)

使用指定的組合語言、匯入命名空間、變數、表達式文字及初始大小建立新的表達式編輯器。

CreateExpressionEditor(AssemblyContextControlItem, ImportedNamespaceContextItem, List<ModelItem>, String, Type, Size)

使用指定的組合語言、匯入的命名空間、變數、表達式文字、表達式類型及初始大小,建立新的表達式編輯器。

CreateExpressionEditor(AssemblyContextControlItem, ImportedNamespaceContextItem, List<ModelItem>, String, Type)

使用指定的組合語言、匯入的命名空間、變數、表達式文字及表達式類型建立新的表達式編輯器。

CreateExpressionEditor(AssemblyContextControlItem, ImportedNamespaceContextItem, List<ModelItem>, String)

建立一個新的表達式編輯器。

UpdateContext(AssemblyContextControlItem, ImportedNamespaceContextItem)

更新編輯會議的上下文。

適用於