Provides a base class that can be used to design value editors that can provide a user interface (UI) for representing and editing the values of objects of the supported data types.
See Also: UITypeEditor Members
The System.Drawing.Design.UITypeEditor class provides a base class that you can derive from and extend to implement a custom type editor for the design-time environment. Typically, your custom type editor interacts with the System.Windows.Forms.PropertyGrid control.
Custom type editors are useful in situations where a text-box value editor is insufficient to effectively select the values of certain types.
To implement a custom design-time UI type editor, you must perform the following steps:
Define a class that derives from System.Drawing.Design.UITypeEditor.
Override the UITypeEditor.EditValue(IServiceProvider, object) method to handle the user interface, user input processing, and value assignment.
Override the UITypeEditor.GetEditStyle method to inform the Properties window of the type of editor style that the editor will use.
You can add additional support for painting a value's representation in the Properties window by performing the following steps:
Override the UITypeEditor.GetPaintValueSupported method to indicate that the editor supports displaying the value's representation.
Override the UITypeEditor.PaintValue(object, System.Drawing.Graphics, System.Drawing.Rectangle) method to implement the display of the value's representation.
Override the System.Drawing.Design.UITypeEditor constructor method if the editor should have initialization behavior.
The System.Drawing.Design.UITypeEditor class does not support right-to-left (RTL) layouts.
For more information about enhancing design-time support, see Extending Design-Time Support. For more information on implementing a System.Drawing.Design.UITypeEditor, see User Interface Type Editors Overview.