- In the source code editor window position the caret on a token that has a type ...
- Right-click for the context menu
- "Add to Quick Diagram"
- "Add to Quick Diagram With Hierarchy" also adds the base type and all subtypes (recursively).
- The Quick Diagram tool window opens automatically if you add anything to it.
- But if it was closed then you can open it again from the Visual Studio menu bar:
- View > Other Windows > Quick Diagram
- Or use the keyboard shortcut: Ctrl+Shift+D, Ctrl+Shift+D (yes, the same key combination twice).
- Use the "Show/Hide Descriptions" toolbar button to show/hide type descriptions (the summary part of the type's XML documentation).
- Click on the pop-up mini-buttons on the diagram nodes to show related entities.
- Black dots on the side of the type's rectangle means that it has some related entities.
- Italic type name means abstract type.
- Bold type name means that it was found in source code.
- Normal (non-bold) type name means that it was found in metadata (referenced assembly).
- Double-click on a diagram shape.
- It works only for those types that were found in the source code (and not in metadata).
- Click on the "remove" mini-button on a shape to remove it from the diagram.
- Use the "Copy to Clipboard" / "Save to File..." toolbar buttons to save/copy the diagram.
- Set the desired resolution in DPI (dots per inch).
- Use the "Clear Diagram" toolbar button to remove all shapes from the diagram.
- Use the "Update Diagram from Code" toolbar button to synchronize the diagram with the changed code.
- Updates those entities that have the same fully qualified name.
- Removes those entities that no longer exist in code.
- Unfortunately this feature can't track type renames so renamed types will be removed from the diagram and must be manually added back if needed.
- Use the mouse:
- Pan by holding down the left mouse button.
- Zoom with the mouse wheel.
- Or use the keyboard (only if the diagram window has the focus):
- Pan with the cursor keys.
- Zoom with W and S keys (FPS shooter-style :)
- Or use the pan and zoom control on the diagram.
- Use the "Fit Diagram to Window" toolbar button, or the rectangle in the Pan and Zoom Control.