User Controls not showing up in the toolbox

前端 未结 29 2169
暗喜
暗喜 2020-12-13 12:21

I have some UserControls that I created in ProjectA. I have ProjectB that has a windows form that I want to put the controls on. Both of these projects are in a single sol

29条回答
  •  抹茶落季
    2020-12-13 12:42

    Apart all instructions that have been given(Tools > Options > Windows Forms Designer > General : AutoToolboxPopulate) + you need to build the solution (which is obvious for me) you will probably have to pay attention to the class access modifier: it MUST be PUBLIC. I just created a control and did not appeared in toolbox list and I did not knew why. So after set

    public class  yourClass:control {}
    

    than it appeared in list. ;) Hope this will help others.

提交回复
热议问题