18.3. Toolbox

To facilitate items being added to the class diagram, there is a Class Designer tab in the Toolbox. To create an item, drag the item from the Toolbox onto the design surface or simply double-click it. Figure 18-3 shows the Toolbox with the Class Designer tab visible. The items in the Toolbox can be classified as either entities or connectors. Note the Comment item, which can be added to the Class Designer but does not appear in any of the code; it is there simply to aid documentation of the class diagram.

Figure 18.3. Figure 18-3

18.3.1. Entities

The entities that can be added to the class diagram all correspond to types in the .NET Framework. When a new entity is added to the design surface, it needs to be given a name. In addition, you need to indicate whether it should be added to a new file or an existing file.

Entities can be removed from the diagram by right-clicking and selecting the Remove From Diagram menu item. This will not remove the source code; it simply removes the entity from the diagram. In cases where it is desirable to delete the associated source code, select the Delete Code menu item.

The code associated with an entity can be viewed by either double-clicking the entity or selecting View Code from the right-click context menu.

The following list explains the entities in the Toolbox:

  • Class: Fields, properties, methods, events, and constants can ...

Get Professional Visual Studio® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.