IDiagramContext Interface
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.
Namespace: Microsoft.VisualStudio.ArchitectureTools.Extensibility.Presentation
Assembly: Microsoft.VisualStudio.ArchitectureTools.Extensibility (in Microsoft.VisualStudio.ArchitectureTools.Extensibility.dll)
Syntax
public interface IDiagramContext
public interface class IDiagramContext
type IDiagramContext = interface end
Public Interface IDiagramContext
Properties
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. |
Remarks
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:
See Also
Microsoft.VisualStudio.ArchitectureTools.Extensibility.Presentation Namespace
Return to top