开发者

Usercontrols that inherit from abstract class

开发者 https://www.devze.com 2023-03-11 00:06 出处:网络
I\'ve got a usercontrol that inherits from an abstract class. Basically looks like this. class SimpleSlideView : View

I've got a usercontrol that inherits from an abstract class. Basically looks like this.

class SimpleSlideView : View
{

}

public abstract class View : UserControl
{

}

The project compiles and runs fine. I can take the usercontrol (from the toolbox) and drag it into a form and it is displayed in the designer correctly. However, if I try a开发者_如何学Gond open the SimpleSlideView control itself in the designer I receive the following error:

The designer must create an instance of type 'Animation.View' but it cannot because the type is declared as abstract.

What have I missed?


You can find possible solution here: How can I get Visual Studio 2008 Windows Forms designer to render a Form that implements an abstract base class?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号