I made a usercontrol in my project, and after building project, I need to put it in my toolbox, and use it as a common control. but i can't. the UserControl
is in my project namespace, and I tried Choose Item
in right click menu, but I didn't find a way to add it.
The Toolbox window displays controls that you can add to Visual Studio projects. To open Toolbox, choose View > Toolbox from the menu bar, or press Ctrl+Alt+X. You can drag and drop different controls onto the surface of the designer you are using, and resize and position the controls.
I had problems getting them to add automatically to the toolbox as in VS2008/2005.
There's actually an option to stop the toolbox auto-populating!
Go to Tools > Options > Windows Forms Designer > General
At the bottom of the list, you'll find Toolbox > AutoToolboxPopulate which on a fresh install defaults to False. Set it true and then rebuild your solution.
Hey presto, the user controls in your solution should be automatically added to the toolbox.
You might have to reload the solution as well.
Right-click on toolbar then click on "choose item" in context menu. A dialog with registered components pops up. in this dialog click "Browse" to select your assembly with the usercontrol you want to use.
PS. This assembly should be registered before.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With