我该如何与QUOT;隐藏]控制了我的控制从工具箱中使用? [英] How do I "hide" controls that my control uses from the toolbox?

查看:116
本文介绍了我该如何与QUOT;隐藏]控制了我的控制从工具箱中使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了在C#中的控件。除此之外这个控件可以在运行时弹出其他控件。当你包括在Visual Studio中组装,我创建的控件显示出来,但其他控件(我的控制使用的)显示为好。我不想让他们在Visual Studio工具箱中显示出来。有没有办法,我可以申请到这些类,使它们无法显示的属性?我发现浏览的属性,但它说,它是属性和事件。

I have developed a control in C#. Among other things this control can popup other controls at runtime. When you include the assembly in Visual Studio, the control that I created shows up, but the other controls (the ones my control uses) show up as well. I would rather not have them show up in the toolbox in Visual Studio. Is there an Attribute that I can apply to these classes to make them not show up? I found the browsable attribute, but it says it is for properties and events.

推荐答案

添加[的ToolboxItem(假)]属性给你不希望在工具箱中展现出来的类。

Add the [ToolboxItem(false)] attribute to the classes that you don't want to show up in the toolbox.

这篇关于我该如何与QUOT;隐藏]控制了我的控制从工具箱中使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆