【发布时间】:2013-12-26 08:33:26
【问题描述】:
我使用 VS 2010 在 C# 中创建了一个自定义控件,它基于(继承)VS 2010 附带的 RectangleShape 控件,但我在 VS 2010 中看不到它工具箱 .为什么没有?
public partial class StepControl : Microsoft.VisualBasic.PowerPacks.RectangleShape
{
public StepControl()
{
InitializeComponent();
}
protected override void OnPaint(PaintEventArgs pe)
{
base.OnPaint(pe);
}
}
【问题讨论】:
-
您是否将包含控件的程序集添加到工具箱中?看到这个类似的问题:stackoverflow.com/questions/3446431/…
-
这个控件是我项目的一部分,不是一个单独的 DLL 控件。我检查了 Options -> Windows Forms Designer -> AutoToolboxPopulate 但它是 True 所以这不是问题
标签: c# custom-controls