The ControlDesigner Base Class

Just as .NET provides base classes for developing controls, there also exists a set of base classes for implementing designers. In Chapter 5, “Advanced Control Development,” the designer base classes are covered in more detail; for now, the ControlDesigner base class is the focus.

The ControlDesigner base class provides the bare-bones functionality for designing a control. Figure 3.1 shows a UML diagram of the ControlDesigner inheritance chain and supported interfaces. UML, or Unified Modeling Language, diagrams are helpful tools for visualizing the various components and classes of any software project.

Figure 3.1. The ControlDesigner hierarchy.


The base class for ControlDesigner is ComponentDesigner. The ComponentDesigner base class provides support for general component design and is not intended to be used directly for providing design-time support for controls. Its purpose is to provide common functionality for component design-time support.

The ControlDesigner base class serves as a starting point for creating control designers and implements the necessary interfaces for VS .NET. The ControlDesigner base class will serve as the base class for the IconButtonDesigner developed in this chapter. Remember that each control has an associated designer class. This association between the control and its designer class is created by specifying the designer class of a control through the use of an attribute. The DesignerAttribute is used for this purpose.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.190.101