日期:2014-05-18  浏览次数:21144 次

请问这控件是什么错呢:The designer must create an instance of type 'AUserControl' but it cannot because the type is declared as abstract.

各位好.我现在是定义一个UserControl的AUserControl,然后再定义一个UserControl的BUserControl,BUserControl继承AUserControl,其中定义如下:

public abstract partial class AUserControl : UserControl
{
}

public partial class BUserControl: AUserControl 
{
}

但是当我要打开BUserControl进行编辑的时候,却不能打开.然后报错提示:
The designer must create an instance of type 'AUserControl' but it cannot because the type is declared as abstract.

请高人给予指教.
先谢谢了!

急等中...

------解决方案--------------------
AUserControl 是抽象类,编译器无法将其实例化啊。

------解决方案--------------------
意思是:
设计器必须创建类型“LockApp.AUserControl”的实例,但该类型已声明为抽象,因此设计器无法创建该类型的实例。