开发者

Stop silverlight or wpf usercontrols from loading in the toolbox?

I have a project with 100's of usercontrols. When I load the p开发者_如何学JAVAroject 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?


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.


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜