开发者

Share a (container)control from a (custom)control?

Soo... I am making a control like the Windows Update "panels".

Everything's fine up to the "container" part.

What I want to do is to allow the designer to place controls in a Panel which is inside开发者_JAVA百科 my control.

(The panel's variable is held in my control's class and inside the control itself.)

How do I bypass this?

As a reference, you might want to try out this AeroWizard Control, which does this pretty well.

(Yes, I have looked at it and didn't find a clue but custom designers!)

As a side note, I'd rather not make a complicated designer class...


If you don't want to create a custom designer class, you should implement your control as a templated custom control, preferably inheriting from CompositeControl.

There doesn't seem to be a way to do the same in Windows Forms without a custom designer class. However, there's a nice, short, working example of such a designer here.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜