开发者

C# - Custom control with panel on it, how do I make the IDE add items to the panel?

I have a custom control which contains a panel, of which I want to be able to drop controls on in the VS IDE and have those controls actually be a child of the panel (which is a child of my custom cont开发者_运维技巧rol) and not have them added to the form my custom control is on.

Basically what happens when you drop controls on a panel not contained in a custom control.

I've tried to google it, but can't seem to come up with any good results, any help would be appreciated :)


Assuming that you're talking about WinForms I think you'll get what you want if you change your custom control to inherit from ContainerControl rather than UserControl.

If it's WebForms it might be worth looking at ContainerControlDesigner, but I don't know much about that.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜