How to create Asp.net c# Custom control with properties select from a dropdownlist?
Example: I try to create my own TextBox inherit from TextBox. It has a property named "MyOwnColor". When add custom control to Visual Studio, in the properties windo开发者_如何学Cw, property "MyOwnColor" can input by type Text to input field. So, what can i replace input field with a dropdownlist that has some selection are set by me?
Image: http://i.stack.imgur.com/7UaLV.jpg I want to create properties like Border Style. I have read some sucguest about "TypeConverter" but i don't know how to use ...
Can you help me?
I am bad at English. Thanks...
I've asked on some forum and answer is: Use an enum.
public enum Color
{
Red,
Blue,
Green
}
精彩评论