简体   繁体   English

如何从Visual Studio中的工具箱中删除用户控件条目?

[英]How to remove user control entries from toolbox in Visual studio?

There are dozens of user control in our project. 我们的项目中有许多用户控件。 All these controls load into the Toolbox. 所有这些控件都加载到工具箱中。 I think this slows down the system when we work with the designer. 我认为当我们与设计师合作时,这会减慢系统速度。 Is this true? 这是真的? If so, then how to remove these controls from the Toolbox? 如果是这样,那么如何从工具箱中删除这些控件?

如果要阻止项目中的某些用户控件自动添加到工具箱,则可以将[System.ComponentModel.ToolboxItem(false)]属性添加到usercontrol类( 此语法假定您使用的是C# )。

This will definitely slow down VS if there are a lot of projects all containing user controls. 如果有很多项目都包含用户控件,这肯定会减慢VS.

Answer from linked questions: 来自关联问题的答案:

Check this setting: 检查此设置:

Tools > Options > Windows Forms Designer > General : AutoToolboxPopulate 工具>选项> Windows窗体设计器>常规:AutoToolboxPopulate

It should be set to FALSE. 它应该设置为FALSE。

You can either delete the tab they are all in by right clicking and "Delete Tab". 您可以通过右键单击和“删除选项卡”删除它们所在的选项卡。

Or just right click on the item itself and "Delete" 或者只需右键单击项目本身并“删除”

Ive persoanlly never noticed a slow down and ive all the Telerik ASP.NET set and quite a few custom ones in certain projects. Ive persoanlly从来没有注意到减速和ive所有的Telerik ASP.NET设置和在某些项目中的一些自定义的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM