Export (0) Print
Expand All

ExpressionEditorSheet.GetExpression Method

When overridden in a derived class, returns the expression string that is formed by the expression editor sheet property values.

Namespace:  System.Web.UI.Design
Assembly:  System.Design (in System.Design.dll)

public abstract string GetExpression()

Return Value

Type: System.String
The custom expression string for the current property values.

A custom expression editor sheet contains design-time settings for multiple expression properties, which are combined to form an expression string. Control property values can be set using expression strings; the expression strings are evaluated at run time by an expression builder.

The GetExpression method returns an expression string that is built from the current expression properties. The visual designer allows you to set the expression sheet properties, and then calls the GetExpression method to get the expression string and set the control property value.

Notes to Inheritors

Derive a custom expression editor sheet from the ExpressionEditorSheet class, if you are defining a new expression type for control property values and you want to build the expression string based on multiple expression property values. A derived class implementation should contain the following:

  • A public property for each distinct value in the expression string that can be set at design time.

  • An implementation of the GetExpression method that forms the custom expression string from the editor sheet property values.

  • Optionally, a constructor implementation that sets the initial values of the editor sheet properties.

The associated custom expression editor class creates an instance of the derived editor sheet in the GetExpressionEditorSheet method, initializes that instance with the current expression string set for the control property, and then returns the instance to the visual designer. The visual designer allows you to set the expression sheet properties, and then calls the GetExpression method to form the expression string from the input expression sheet property values.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

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