How to: Customize Class Diagrams (Class Designer)

You can change the way that class diagrams display information. You can customize the whole diagram or the individual types on the design surface. For example, you can adjust the zoom level of an entire class diagram, change how individual type members are grouped and sorted, hide or display Association and Inheritance lines, move individual or sets of types anywhere on the design surface.

The individual nodes that contain type members (for example, the Properties node for a class) are named Compartments. Individual compartments and type members can be hidden or displayed.

Note

Customizing classes as described in this topic modifies the way elements are displayed on the Class Designer, not the underlying code that describes the classes being displayed.

To zoom in and out of the class diagram

  1. Open and select a class diagram file in Class Designer.

  2. On the Class Designer toolbar, click the Zoom In or Zoom Out button to change the zoom level of the designer surface.

    or

    Specify a particular zoom value. You can use the Zoom drop down list or type a valid zoom level (valid range is between 10% and 400%).

    Note

    Changing the zoom level does not affect the scale of your class diagram printout.

To customize grouping and sorting of type members

  1. Open and select a class diagram file in Class Designer.

  2. Right-click an empty area on the design surface and point to Group Members.

  3. Select one of the available options:

    1. Group by Kind separates individual type members into a grouped list of Properties, Methods, Events, and Fields. The individual groups depend on the entities definition: for example, a class will not display any events group if there are no events yet defined for that class.

    2. Group by Access separates individual type members into a grouped list based on the member's access modifiers. For example, Public and Private.

    3. Sort Alphabetically displays the items that make up an entity as a single alphabetized list. The list is sorted in ascending order.

To hide compartments on a type

  1. Open and select a class diagram file in the class designer.

  2. Right click the member category in the type you want to customize (for example, select the Methods node in a class.

  3. Click Hide Compartment.

    The selected compartment disappears from the type container.

To hide individual members on a type

  1. Open and select a class diagram file in Class Designer.

  2. Right-click the member in the type you want to hide.

  3. Click Hide.

    The selected member disappears from the type container.

To display hidden compartments and members on a type

  1. Open and select a class diagram file in Class Designer.

  2. Right-click the name of the type with the hidden compartment.

  3. Click Show All Members.

    All hidden compartments and members appear in the type container.

To hide Association and Inheritance lines

  1. Open and select a class diagram file in Class Designer.

  2. Right-click the association or inheritance line that you want to hide.

  3. Click Hide for association lines, and click Hide Inheritance Line for inheritance lines.

  4. Click Show All Members.

    All hidden compartments and members appear in the type container.

To display hidden Association and Inheritance lines

  1. Open and select a class diagram file in Class Designer.

  2. Right-click the type with the hidden association or inheritance.

Click Show All Members for association lines, and click Show Base Class or Show Derived Classes for inheritance lines.

See Also

Tasks

How to: Change Between Member Notation and Association Notation (Class Designer)

Other Resources

Working with Class Diagrams (Class Designer)