IDiagramContext Interface
Visual Studio 2015
Provides access to a diagram. You can obtain an instance of this type by declaring an Imported property DiagramContext in a UML extension. You can also cast to and from EnvDTE.ProjectItem, if the item is a UML diagram.
Assembly: Microsoft.VisualStudio.ArchitectureTools.Extensibility (in Microsoft.VisualStudio.ArchitectureTools.Extensibility.dll)
| Name | Description | |
|---|---|---|
![]() | CurrentDiagram | The diagram accessible from this context. If you have obtained the IDiagramContext by casting a EnvDTE.ProjectItem, the diagram might not be the currently activated diagram. |
In a UML extension such as a menu command or gesture handler, you can declare a property:
[Import] public IDiagramContext DiagramContext {get; set;}
This will be set to the Visual Studio project item containing the current diagram.
You can also cast EnvDTE.ProjectItem to this type, if the item is a UML diagram.
For more information, see the following topics:
Show:
