Using the UITypeEditor Class
If you have started wondering how to display list boxes, NumericUpDown controls, little boxes that contain colors, or dialog boxes for editing properties in the IDE, you have come to the right place. By creating a custom UITypeEditor instance you can add enhanced property editing to your custom control. To demonstrate I will show you how to display a list of states to choose from—a custom type editor—and how to associate that type editor and provide a default value for the State combobox in the AddressUserControl.
To implement a drop-down list of states in the AddressUserControl's State combobox, we need to define a custom type editor and provide an overridden implementation for the methods EditValue and GetEditStyle ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access