Assembly: System.Design (in system.design.dll)
A custom expression editor sheet lets a developer set properties on a custom expression at design-time. Control property values can be set using expression strings; the expression strings are evaluated at run time by an expression builder and at design time by an expression editor.
When you browse the Expressions property for a control in the design-time properties grid, the visual designer displays a dialog box to set expressions that provide the value for a control property. You can select the expression type based on a list of expression prefixes. When you select an expression prefix from the list, the visual designer uses the associated ExpressionEditor and ExpressionEditorSheet objects to evaluate and convert the expression string based on the syntax for that type of expression. The visual designer uses expression editor sheet properties to prompt for one or more strings that combine into the custom expression string.
Typically, to supply a new expression type at design time, you define a unique expression prefix and provide custom ExpressionBuilder and ExpressionEditor implementations. Optionally, you can provide a custom ExpressionEditorSheet implementation that defines properties that are used to form the expression. To associate an expression prefix with an expression builder and an expression editor, apply the ExpressionEditorAttribute attribute and an ExpressionPrefixAttribute attribute to the custom ExpressionBuilder class, and then configure the expression prefix for an expression builder in the expressionBuilders element in the Web configuration file.
The default implementation of the GetExpressionEditorSheet method returns a basic editor sheet, which uses a single input string to form the expression. Custom expression editors that are derived from the ExpressionEditor can override the GetExpressionEditorSheet method to return a custom editor sheet implementation. Typically, a custom editor sheet contains multiple properties that are used to build the expression string. The GetExpression method returns the resulting expression string based on the current expression properties.
For example, the ResourceExpressionEditor class derives from the ExpressionEditor class and provides an implementation for evaluating and associating a resource string reference with a control property at design time. The ResourceExpressionBuilder class is associated with the expression prefix Resources and the ResourceExpressionEditor implementation. The GetExpressionEditorSheet method returns a ResourceExpressionEditorSheet, which defines the individual properties that form a resource reference expression.
When you inherit from the ExpressionEditorSheet class, you must override the following members:
The GetExpressionEditorSheet method to return a custom editor sheet implementation.
The ExpressionEditorSheet constructor to implement custom initialization actions for your expression editor sheet implementation.
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.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.