O'Reilly logo

.NET Windows Forms in a Nutshell by Matthew Adams, Ian Griffiths

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. The System.ComponentModel Namespace

The System.ComponentModel namespace provides many of the classes that support the design-time features of the framework. The key class is Component, which provides a means of encapsulating a class for design-time hosting. IContainer and ISite provide a means to host Component objects and bind them to the design-time environment. Support for custom designers is provided by the System.ComponentModel.Design.IDesigner interface, System.Drawing.Design.UITypeEditor, and custom TypeConverter classes. Figure 13-1 shows many types from this namespace.

There are also a number of classes related to license management.

The designer environment is largely controlled through metadata provided by custom attributes. Classes and properties are adorned with these attributes to indicate how they should appear in the designer host, which custom designers to use, and how they should be serialized. Figure 13-2 shows the attributes in this namespace.

Note that several of the essential classes for the design-time environment can be found in System.ComponentModel.Design, System.Windows.Forms.Design, and System.Drawing.Design.

In addition to the design-time component support, this namespace has become a dumping ground for classes (such as IListSource) that support the data-binding framework, but are not specifically UI related (and hence, are not to be found in the System.Windows.Forms namespace). There are also a couple of refugees from System.Configuration

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required