0

so I created a custom panel class like public class CustomPanel : Panel. When I double-click it in Solution explorer, its design opens, but its empty (can't see the panel itself, just the text:"To add components to your class, drag them from the toolbox etc...".

Q: What should I do to make my custom component editable in its design window ? Couldn't find anything anywhere..

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Haf_SK
  • 302
  • 2
  • 11

1 Answers1

3

If you want to design time edit you shoud create UserControl instead. (place Panel or your custom Panel on it and do whatever you want.. in DesignMode)

When you derive (like you described) you just alter or add new methods / properties to Panel class and you can use it instead of standard Panel class.

Kamil Lach
  • 4,519
  • 2
  • 19
  • 20