Represents a ShapeElement, a ShapeField, or a ShapeSubField. This is intended to be used for hit-testing, selection, focus, and accessibility.
Inheritance Hierarchy
System.Object
  Microsoft.VisualStudio.Modeling.Diagrams.DiagramItem
Namespace:  Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
Syntax
声明
Public Class DiagramItem _
    Implements ICloneable
public class DiagramItem : ICloneable
public ref class DiagramItem : ICloneable
type DiagramItem =  
    class
        interface ICloneable
    end
public class DiagramItem implements ICloneable
The DiagramItem type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| .gif) | DiagramItem() | Initializes a new instance of the DiagramItem class. | 
| .gif) | DiagramItem(ShapeElement) | Initializes a new instance of the DiagramItem class to represent the specified ShapeElement. | 
| .gif) | DiagramItem(LinkShape, LineSegment) | Initializes a new instance of the DiagramItem class to represent the specified LineSegment. | 
| .gif) | DiagramItem(ShapeElement, ShapeField) | Initializes a new instance of the DiagramItem class to represent the specified ShapeField. | 
| .gif) | DiagramItem(LinkShape, LineSegment, AnchorPoint) | Initializes a new instance of the DiagramItem class to represent the specified AnchorPoint. | 
| .gif) | DiagramItem(ShapeElement, ShapeField, ShapeSubField) | Initializes a new instance of the DiagramItem class to represent the specified ShapeSubField. | 
| .gif) | DiagramItem(ShapeElement, ShapeField, ShapeSubField, LineSegment, AnchorPoint) | Initializes a new instance of the DiagramItem class to represent the specified ShapeSubField. | 
Top
Properties
| Name | Description | |
|---|---|---|
| .gif) | AbsoluteBoundingBox | Gets the bounding box in world units relative to the top-left of the diagram. | 
| .gif) | AnchorPoint | Gets the anchorPoint. | 
| .gif) | CanFocus | Gets a value indicating whether this DiagramItem is focusable. | 
| .gif) | CanSelect | Gets a value indicating whether this DiagramItem is selectable. | 
| .gif) | Diagram | Gets the Diagram that the shape belongs to. | 
| .gif) | Field | Gets the field. | 
| .gif) | IsDiagram | Gets a value indicating whether the DiagramItem is the diagram. | 
| .gif) | Parent | Gets the parent DiagramItem. | 
| .gif) | RepresentedElements | Gets a collection of ModelElements that this DiagramItem represents. | 
| .gif) | Segment | Gets the segment. | 
| .gif) | Shape | Gets the shape. | 
| .gif) | SubField | Gets the subfield. | 
Top
Methods
| Name | Description | |
|---|---|---|
| .gif) | Clone | Creates a new DiagramItem that is a copy of the current instance. | 
| .gif) | Equals | Gets a value indicating whether two DiagramItem objects are equal. (Overrides Object.Equals(Object).) | 
| .gif) | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | 
| .gif) | GetAccessibleObject | Gets the AccessibleObject for a DiagramItem. | 
| .gif) | GetHashCode | Gets a hash code for this DiagramItem. (Overrides Object.GetHashCode().) | 
| .gif) | GetType | Gets the Type of the current instance. (Inherited from Object.) | 
| .gif) | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | 
| .gif) | SetItem(ShapeElement) | Sets the DiagramItem to represent the specified ShapeElement. | 
| .gif) | SetItem(LinkShape, LineSegment) | Set the DiagramItem to represent the specified LineSegment | 
| .gif) | SetItem(ShapeElement, ShapeField) | Sets the DiagramItem to represent the specified ShapeField. | 
| .gif) | SetItem(LinkShape, LineSegment, AnchorPoint) | Set the DiagramItem to represent the specified LineSegment's anchor point | 
| .gif) | SetItem(ShapeElement, ShapeField, ShapeSubField) | Sets the DiagramItem to represent the specified ShapeSubField. | 
| .gif) | ToString | Returns a string that represents the current object. (Inherited from Object.) | 
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.