How to put a UserControl into Visual Studio toolBox

前端 未结 10 2182
逝去的感伤
逝去的感伤 2020-11-29 01:02

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

10条回答
  •  春和景丽
    2020-11-29 01:35

    I'm assuming you're using VS2010 (that's what you've tagged the question as) 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 they user controls in you solution should be automatically added to the toolbox. You might have to reload the solution as well.

提交回复
热议问题