Adding Items to the Diagram

You add items to the class designer by using either the Toolbox or the Solution Explorer. The Toolbox is for adding new items. You use the Solution Explorer to add existing classes to the diagram. In both scenarios, you simply drag and drop the item onto the class designer window. If the item already exists, Visual Studio builds out the class details for you. In fact, if the class file contains more than one class, each class is placed as an object on the diagram.

Figure 6.53 shows an example of the class designer Toolbox tools. Notice that you can define all object-oriented concepts here, including classes, interfaces, and inheritance.

FIGURE 6.53 The class designer Toolbox.

When you add a new item such as a class ...

Get Microsoft Visual Studio 2015 Unleashed, Third Edition 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.