IDiagram Interface

Represents a UML modeling diagram. It is a supertype of the specific diagram types such as IClassDiagram. Each diagram is represented as a pair of files in the model.

Namespace:  Microsoft.VisualStudio.ArchitectureTools.Extensibility.Presentation
Assembly:  Microsoft.VisualStudio.ArchitectureTools.Extensibility (in Microsoft.VisualStudio.ArchitectureTools.Extensibility.dll)

public interface IDiagram : IShape

The IDiagram type exposes the following members.

  NameDescription
Public propertyChildShapesShapes that are contained within this shape. For example, the attribute and operation rows of a class shape; class shapes contained inside a package shape; ports and parts inside a component. For each ChildShape, ParentShape == this. (Inherited from IShape.)
Public propertyColorGets or sets the color of the shape. (Inherited from IShape.)
Public propertyDiagramThe diagram that contains this shape. (Inherited from IShape.)
Public propertyFileNameThe path of the modeling project file on which the diagram is stored. This is the name of the principal of the two files.
Public propertyHeight (Inherited from IShape.)
Public propertyModelStoreThe UML model store which contains the diagram and the model that it shows.
Public propertyNameThe name of the diagram. It is not always the same as the file name.
Public propertyParentShapeThe shape that contains this shape, or null. If ParentShape is not null, this shape is a member of ParentShape.ChildShapes. (Inherited from IShape.)
Public propertySelectedShapesThe collection of shapes that are currently selected. If no individual shape is selected, the collection will contain the diagram as its only member. If other shapes are selected, the diagram will not appear in the collection.
Public propertyTypeNameA string indicating what kind of diagram this is, such as "ComponentDiagram".
Public propertyWidth (Inherited from IShape.)
Public propertyXPosition (Inherited from IShape.)
Public propertyYPosition (Inherited from IShape.)
Top

  NameDescription
Public methodDeleteRemoves the shape from the diagram. This might or might not remove from the model the element that the shape displays. For example, removing a class shape from a class diagram does not remove the UML class from the model. (Inherited from IShape.)
Public methodEnsureVisible
Public methodGetObject<T>Gets the model element represented by this shape. Supply the type of the result that you want. (Inherited from IShape.)
Public methodMoveChanges the position and size of the shape. (Inherited from IShape.)
Public methodSelectShapesSets the current selection to the given collection of shapes, and sets the Selection property. This does not activate the window that displays the diagram.
Public methodToIShape<T>Cast to a type that specifies the type of the element that the shape represents. (Inherited from IShape.)
Top

  NameDescription
Public Extension MethodGetChildShapes<T>Get child shapes that display the specified type of model element. (Defined by PresentationHelpers.)
Public Extension MethodGetElementThe model element that this shape represents. (Defined by IShapeExtensions.)
Public Extension MethodGetSelectedShapes<T>Get all the selected shapes that display UML model elements of the specified type. (Defined by PresentationHelpers.)
Public Extension MethodSelectShapesSelect a collection of shapes on the diagram. The shapes must be selectable. The diagram's SelectedShapes property will be updated. (Defined by PresentationHelpers.)
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft