views:

51

answers:

2

I have a project with 100's of usercontrols. When I load the project in VS2010 and try to open a designer, the toolbox spins and spins until they're all loaded.

Winforms has a "AutoToolboxPopulate" switch under Tools/Options/Winddows Forms Designer/General.

I cannot find a similar switch for the XAML designer. Does one exist?

+1  A: 

Unfortunately there isn't one that I am aware of, with the exception of actually adding a design-time (*.Design.dll) assembly for the project that effectively defines metadata to hide the explicit controls.

This bit me as well recently and I wish I had a solution like the old winforms attribute!

Jeff Wilcox
+1  A: 

In VS2010, the Auto Populate Toolbox switch for XAML can be found under Tools/Options/Text Editor/XAML/Miscellaneous.

If you wish to keep the Auto Populate enabled, you can decorate your usercontrol classes with the System.ComponentModel.DesignTimeVisibleAttribute which will allow you to specify if they appear or not in the designer.

Gene Merlin
That works - thanks!
chadbr