Designer Base Classes

Like controls, designers have several base classes to choose from. Each designer base class provides certain functionality that builds on the support provided by the inherited base designer class. At the root of the designer hierarchy is the ComponentDesigner class.

Not every control in .NET is an actual control. Rather, certain items are components that derive from System.ComponentModel.Component. A component has no UI of its own and is often used to hold information for part of its containing control. The Windows Forms Menu and ImageList are two such components. When a component is placed on a Form object, an icon for the component appears within the Component Tray of VS .NET, as shown in Figure 5.2.

Figure 5.2. The VS .NET Component Tray.


In Chapter 7, “OutlookBarTab Component,” the Component class serves as the base class for the OutlookBarTab that is part of the OutlookBar control. Component-derived classes use the ComponentDesigner base class to provide the necessary designer implementation. The ComponentDesigner class implements IDisposable, IDesigner, and the IDesignerFilter interfaces. As such, component designers are capable of filtering properties, events, and attributes and have the capability to expose custom verbs. In addition, components designers can shadow properties and interact with the root document designer, which is the topmost designer. The Form designer is a document designer.

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

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