How to: Implement a UI Type Editor
In some situations, a simple value-to-string conversion that allows a property to be displayed as text in the property browser might not be adequate. Also, a string-to-value configuration style may not be adequate for some types. For instance, in the case of a color property, a visual representation is more desirable. A UI type editor can provide a visual representation of a property value in a property grid control, such as a design-time property browser. A UI type editor can also provide a custom user interface for configuring the value or values of an object of a particular type.
Anis applied to a type or to a property to associate the type or the property with a UI type editor.
To implement a custom UI type editor for Windows Forms
Define a class that derives from.
Override themethod to set up properties of the user interface. This method is overloaded.
Override themethod to inform the property browser about the editing support that you will provide.
For a complete sample, see.
Compiling the Code
When you develop your custom UITypeEditor, it is recommended that you set the build number to increment with each build. This prevents older, cached versions of your UITypeEditor from being created in the design environment.