更新时间:2023-12-06 16:45:46
看看这个 MSDN 演练:自动加载工具箱项.
从上面:
向工具箱添加自定义控件的推荐方法是使用Visual Studio 10 SDK 附带的工具箱控件模板,其中包括自动加载支持.此主题保留用于向后兼容性,用于将现有控件添加到工具箱,以及高级工具箱开发.
The recommended way to add custom controls to the Toolbox is to use the Toolbox Control templates that come with the Visual Studio 10 SDK, which include auto-loading support. This topic is retained for backward compatibility, for adding existing controls to the Toolbox, and for advanced Toolbox development.
查看上述演练提到的 Window Forms Toolbox Control:
Looking at the Window Forms Toolbox Control that above walkthrough mentions:
[ProvideToolboxControl("General", false)]
public partial class Counter : UserControl