Share via


DiagramItemCollection Class

Definition

A collection of DiagramItem instances. A DiagramItem represents a ShapeElement, ShapeField, or ShapeSubField instance on the diagram and is used for such things as hit-testing and selection.

public ref class DiagramItemCollection : System::Collections::CollectionBase, System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::Modeling::Diagrams::DiagramItem ^>
public class DiagramItemCollection : System.Collections.CollectionBase, System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.Modeling.Diagrams.DiagramItem>
type DiagramItemCollection = class
    inherit CollectionBase
    interface seq<DiagramItem>
    interface IEnumerable
Public Class DiagramItemCollection
Inherits CollectionBase
Implements IEnumerable(Of DiagramItem)
Inheritance
DiagramItemCollection
Derived
Implements

Constructors

DiagramItemCollection()

Initializes a new instance of the DiagramItemCollection class.

Properties

Item[Int32]

Gets the DiagramItem at the specified position in the collection.

Methods

Add(DiagramItem)

Adds a specific DiagramItem to the collection.

Add(ICollection)

Adds the DiagramItem of an ICollection to the end of the DiagramItemCollection

Contains(DiagramItem)

Determines whether a DiagramItem is in the collection.

CopyTo(DiagramItem[], Int32)

Copies the DiagramItems of the selection to an Array, starting at a particular Array index.

GetEnumerator()

Gets a DiagramItem enumerator for this collection.

IndexOf(DiagramItem)

Returns the zero-based index of the DiagramItem in the collection.

Insert(Int32, DiagramItem)

Inserts the DiagramItem into the collection at the specified index.

Remove(DiagramItem)

Removes the first occurrence of a specific DiagramItem from the collection.

Remove(ICollection)

Removes the specified DiagramItems from an ICollection

Extension Methods

EmptyIfNull<T>(IEnumerable<T>)

Return this enumeration in case it is not null. In case it is null return empty enumeration.

Applies to