How to: Add Comments to Class Diagrams

You can use comment shapes to annotate class diagrams. A comment shape has one property, Text, into which you can type text. Comment shapes exist only on the diagram surface and not in code.

A comment resides on the class diagramview in Class Designer; if you open a second class diagram onto the same project, comments you created in the first view are not visible. If you delete a diagram, all the comments it contained are also deleted.

You can resize a comment shape but you cannot change other aspects of its appearance, such as its background color, font, or font size.

To add a comment

  1. Drag a comment from the Class Designer Toolbox onto the class diagram.

  2. Click in the new comment shape on the diagram and type the text you want.

See Also

Concepts

Customizing Class Diagrams

Other Resources

Working with Class Diagrams

Working with Class Diagrams