Update
After tons of searches, I found what I had answered was only partially correct, so I would like to answer it again.
The answer to your question is a definite NO, we have some other way to show values on property as DropDownList
. Like what I mentioned in my old answer, if values come from some kind of Set
, or in other word it belongs to a collection of values, it will be displayed as a DropDownList
without any extra efforts (because the UITypeEditor
has been specified for them, you will understand this point later). Here are 3 examples:
- If a
Property
is a bool
, in the designer it will show you a DropDownList
contains True
and False
;

- If a
Property
is a Font.Name
, in the designer it will show you a DropDownList
with SmallIcon
;

- if a
Property
is a Color
, in the designer it will show you some DropDownList
encapsulated in a TabControl
.

From those "native" examples, you may realize a fact: we could somehow use some controls other than a simple DropDownList
in the Property Tab
during the design time. For example, a Color
property gives a TabControl
instead of a simple DropDownList
, and a Font.Name
property gives a customized DropDownList
.
Yes, this is the second thing I am going to talk about. You are not only able to customize the items in the DropDownList
, but also the View
of that Value Choosing Editor
.
However, this is very tricky and non-trivial. You are not recommended to do this unless it really adds value to your user control in the design time.
In short, you need to inherit from UITypeEditor
, and override 2 functions:
GetEditStyle()
, which
indicates to the design environment which kind of user interface your UI type editor implements
and EditValue()
, which
establishes the interaction between the design environment and the user interface for editing your custom type
Then for your property which makes use of the Editor
, you need to add EditorAttribute
to it to specify the Editor
used when selecting value of that property.
For better details, you are suggested to check this MSDN walk-through, which explains how to design a customized Value Editor
in the design time.
Now back to the point where we left over. The native type, like bool
and Color
, has already bond to
a UITypeEditor
, thus no further working should be done.
Old Answer:
For properties, you need to choose a value from a kind of Set
, and all elements in that Set
will be displayed as Items
in a DropDownList
during design time. When you try to define the Set
, Enum
is one method to define them. Also, you can use set of struct
, like Color
. In other words, if you have a Property
that returns Color
(or other structs), during design time it will appear as a drop down list.