ExpressionEditorSheet::GetExpression Method
When overridden in a derived class, returns the expression string that is formed by the expression editor sheet property values.
Assembly: System.Design (in System.Design.dll)
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 InheritorsDerive 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.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.