I have an existing library (not a Winforms application) that supplies some Winforms to a bona-fide Windows application. Within this library, I would like to create a User Control to group some controls together. To accomplish this, I right-clicked, Add, User Control and dragged some controls onto the new User Control.
So far, so good. The User Control even has the requisite User Control icon. But dragging the new User Control from the Solution Explorer to a new blank Winform does not work (I get a circle with a line through it), and dragging it over to the Toolbox doesn't work either (even though I get a + sign when I drag it over the Toolbox).
Is there some sort of XML magic or something else I'm missing to make this work?
Assuming I understand what you mean:
UserControl is in a library you can add this to you Toolbox using
Toolbox -> right click -> Choose Items -> Browse
Select your assembly with the
UserControl is part of your project you only need to build the entire solution. After that, your
UserControl should appear in the toolbox.
In general, it is not possible to add a Control from Solution Explorer, only from the Toolbox.