Prevent adding controls from toolbox to a UserControl at Design Time

328 views Asked by At

I'm trying to create a user control that inherits of Panel. It has to be like a header, i'll draw border and text etc. But the sole purpose of creating it is, that i want that during design time, if I drag a control on it I get the "No" / "forbidden" cursor and of course, that the designer doesn't add the control onto my user control.

In other words, it must acts like the header of the TabControl, where you can't add control.

I'm sorry I don't even a single line of code to post. I tried to dig into custom designers, but I failed to find.

Any help and suggestion would be highly appreciated !

0

There are 0 answers