You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何自定义Visual Studio工具箱中控件库的显示标题

更改Visual Studio工具箱中用户控件库的显示名称

要将工具箱中显示的Company.UI.Controls Components改为Company buttons,可以通过以下几种方式实现:

1. 为整个程序集指定工具箱分组(推荐)

在项目的AssemblyInfo.cs文件中添加ToolboxItemGroup属性,统一设置整个控件库的工具箱分组名称:

using System.ComponentModel;

[assembly: ToolboxItemGroup("Company buttons")]

2. 修改程序集标题属性

同样在AssemblyInfo.cs中修改程序集标题,这个属性会同步影响工具箱中库的显示名称:

using System.Reflection;

[assembly: AssemblyTitle("Company buttons")]

3. 为单个控件指定分组

如果仅需要特定控件归到目标分组,可在控件类上添加属性:

using System.ComponentModel;

[ToolboxItemGroup("Company buttons")]
public class YourCustomButton : UserControl
{
    // 控件实现代码
}

生效步骤

修改完成后重新生成项目,然后在Visual Studio工具箱中:

  • 右键选择选择项,找到你的控件库并重新勾选加载
  • 或删除原有工具箱条目后重新添加控件库

内容的提问来源于stack exchange,提问作者armadillo.mx

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.21 14:02:02