我认为这很简单,但今天我却无法做到。
我有一个用户控件,在其中包含一个网格控件。
public Unit Width
{
get
{
return CustomerGrid.Width;
}
set
{
CustomerGrid.Width = value;
}
}
我暴露了width属性,当我在设计器中设置它时,在运行时它可以正常工作,但在设计时不行。我应该继承哪个类或重写哪个方法以使我的控件在设计时也能正常工作?
请注意,我尝试从WebControl继承,但收到了消息。
Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class