Abstract UserControl inheritance in Visual Studio designer

前端 未结 9 1401
广开言路
广开言路 2020-12-01 12:13
abstract class CustomControl : UserControl 
{
    protected abstract int DoStuff();
}

class DetailControl : CustomControl
{
    protected override int DoStuff()
            


        
9条回答
  •  日久生厌
    2020-12-01 12:20

    I couldn't make work the solution of 'Nicole Calinoiu'. But there is an other easy way directly in visual studio:)

    1. Create new project
    2. Add new element 'userControl' and add one button for example
    3. Add new element 'userControl' Inhereted UserControl then select the inhereted userControl.

    More details here : 'http://www.codeproject.com/Articles/20845/How-to-derive-from-a-parent-form

提交回复
热议问题