I am writing a number of controls which use inheritance and I have a
problem that I do not know how to solve. It's best if I describe the
class structure I want.
Grid - derives from UserControl and contains most of the functionality
required of a basic grid.
ViewGrid, EditGrid and TreeGrid - all derive from Grid
The problem I have is that I never want the programmer to create an
object of type Grid - they should choose the derived class that best
fits their needs.
If these were normal classes then I would just declare the Grid class
as abstract and it would work as I would like it to. The problem is
that they derive from UserControl and the designer needs to create an
instance of Grid when I view EditGrid in the designer.
Another idea I had was to declare the Grid class as protected or
internal but then I cannot derive a public class from it.
Is there a way to specify that a UserControl derived class cannot be
created outside of the assembly that it is in and still enable it to be
created by the designer?
steve.kaye