开发者

How to create Asp.net c# Custom control with properties select from a dropdownlist?

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
        }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜