Silverlight UserControls Don't Appear in Toolbox
I started with a Silverlight Business Application project in VS 2010 and added two user controls. If I create an instance of either user control in the code behind 开发者_JAVA技巧of the main form and add them to the page, they appear properly. However, they are not showing up in the Toolbox.
When I use the "Choose Items" menu option from the Toolbox's MyProject Controls section, Silverlight Components tab, I see that one of my user controls appears in the list and is checked (but does not appear in the Toolbox), while the other user control does not appear in the list at all.
How can I diagnose/repair the situation?
My user controls did not have a default constructor, but rather a constructor that took a parameter with a default value.
Apparently the Toolbox requires a default constructor (not just a constructor that can be invoked without any explicit parameters).
精彩评论