Export (0) Print
Expand All

IExpressionEditorService Interface

Creates or closes expression editors.

Namespace:  System.Activities.Presentation.View
Assembly:  System.Activities.Presentation (in System.Activities.Presentation.dll)

public interface IExpressionEditorService

The IExpressionEditorService type exposes the following members.

  NameDescription
Public methodCloseExpressionEditorsCloses all the active expression editors.
Public methodCreateExpressionEditor(AssemblyContextControlItem, ImportedNamespaceContextItem, List<ModelItem>, String)Creates a new expression editor.
Public methodCreateExpressionEditor(AssemblyContextControlItem, ImportedNamespaceContextItem, List<ModelItem>, String, Type)Creates a new expression editor using the specified assemblies, imported namespaces, variables, expression text, and expression type.
Public methodCreateExpressionEditor(AssemblyContextControlItem, ImportedNamespaceContextItem, List<ModelItem>, String, Size)Creates a new expression editor using the specified assemblies, imported namespaces, variables, expression text, and the initial size.
Public methodCreateExpressionEditor(AssemblyContextControlItem, ImportedNamespaceContextItem, List<ModelItem>, String, Type, Size)Creates a new expression editor using the specified assemblies, imported namespaces, variables, expression text, expression type, and the initial size.
Public methodUpdateContextUpdates the context for the editing session.
Top

An expression editor is a Visual Basic control used to edit expressions inside Visual Studio. This control provides a full-fledged IDE editing experience, including IntelliSense, colorization, ParamInfo, error squiggles, among other features.

The IExpressionEditorService can also be used to manage instances of custom expression editors. To register a custom expression editor, you must publish the IExpressionEditorService using the following code :

this.expressionEditorService = new ExpressionEditorService();

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

An expression editor is created when an ExpressionTextBox instance gains focus and is destroyed on losing focus of a valid expression, or on reloading of the designer.

The default expression editor is not available for use in rehosted applications. If the default expression editor is used in a rehosted application, a text box is available for editing. However, custom expression editors can be used in a rehosted application by publishing the IExpressionEditorService in the application.

If you are using an ExpressionTextBox control in a custom activity designer, it is not necessary to create and destroy expression editors using this interface. The ExpressionTextBox class manages this for you.

.NET Framework

Supported in: 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft