views:

30

answers:

1

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 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...

+1  A: 

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.

Frédéric Hamidi
No no no, I am programming for WinForms, not ASP.NET! I forgot to add the tag... Now it's fixed. :) And thanks anyway for the answer!
Vercas
Sorry, since you mentioned `UpdatePanel` I assumed `ASP.NET`. I'll see what I can do :)
Frédéric Hamidi
Windows Update "panels" - the panels used in Windows Vista and Windows 7 in programs such as Windows Update. They feature a strip on the left side colored to show some status, an icon next to the strip and a "main instruction" as text. By the way, I call it TaskPanel. :D
Vercas
Holy cow, it worked! Thank you a lot for the answer! You have saved my life! :)
Vercas