共用方式為


SelectedShapesCollection.Add Method

Definition

Overloads

Add(DiagramItem)

Adds a DiagramItem to the current selection.

Add(DiagramItemCollection)

Adds the specified DiagramItems to the current selection.

Add(DiagramItem)

Adds a DiagramItem to the current selection.

public:
 void Add(Microsoft::VisualStudio::Modeling::Diagrams::DiagramItem ^ diagramItem);
public void Add (Microsoft.VisualStudio.Modeling.Diagrams.DiagramItem diagramItem);
member this.Add : Microsoft.VisualStudio.Modeling.Diagrams.DiagramItem -> unit
Public Sub Add (diagramItem As DiagramItem)

Parameters

diagramItem
DiagramItem

The DiagramItem to add to the current selection.

Remarks

The added DiagramItem automatically becomes the primary DiagramItem.

Applies to

Add(DiagramItemCollection)

Adds the specified DiagramItems to the current selection.

public:
 void Add(Microsoft::VisualStudio::Modeling::Diagrams::DiagramItemCollection ^ diagramItems);
public void Add (Microsoft.VisualStudio.Modeling.Diagrams.DiagramItemCollection diagramItems);
member this.Add : Microsoft.VisualStudio.Modeling.Diagrams.DiagramItemCollection -> unit
Public Sub Add (diagramItems As DiagramItemCollection)

Parameters

diagramItems
DiagramItemCollection

The collection of DiagramItems to add.

Remarks

The last DiagramItem in the collection becomes the primary DiagramItem. If a DiagramItem in the collection is already in the selection, the DiagramItem is ignored.

Applies to