다음을 통해 공유


Diagram.RepositionShapes Method

Definition

Moves the specified DiagramItems by the specified moveDelta. These DiagramItems should be top-level DiagramItems, otherwise the move may not perform as expected. This method calls GetCompliantGroupBounds to determine the destination of each DiagramItem.

public:
 void RepositionShapes(Microsoft::VisualStudio::Modeling::Diagrams::DiagramItemCollection ^ topLevelItems, Microsoft::VisualStudio::Modeling::Diagrams::PointD moveDelta, Microsoft::VisualStudio::Modeling::Diagrams::GhostShapeCollection ^ ghostShapes, Microsoft::VisualStudio::Modeling::Diagrams::DiagramItem ^ hitDiagramItem);
public void RepositionShapes (Microsoft.VisualStudio.Modeling.Diagrams.DiagramItemCollection topLevelItems, Microsoft.VisualStudio.Modeling.Diagrams.PointD moveDelta, Microsoft.VisualStudio.Modeling.Diagrams.GhostShapeCollection ghostShapes, Microsoft.VisualStudio.Modeling.Diagrams.DiagramItem hitDiagramItem);
member this.RepositionShapes : Microsoft.VisualStudio.Modeling.Diagrams.DiagramItemCollection * Microsoft.VisualStudio.Modeling.Diagrams.PointD * Microsoft.VisualStudio.Modeling.Diagrams.GhostShapeCollection * Microsoft.VisualStudio.Modeling.Diagrams.DiagramItem -> unit
Public Sub RepositionShapes (topLevelItems As DiagramItemCollection, moveDelta As PointD, ghostShapes As GhostShapeCollection, hitDiagramItem As DiagramItem)

Parameters

topLevelItems
DiagramItemCollection

The top-level DiagramItems to move.

moveDelta
PointD

The amount to move the DiagramItems by in world units.

ghostShapes
GhostShapeCollection

The collection of GhostShapes to move. This will be passed to GetCompliantGroupBounds to calculate the destination. The GhostShapes represent the DiagramItems at their original location. This parameter can be null, in which case a collection of GhostShapes will be created for the call to GetCompliantGroupBounds.

hitDiagramItem
DiagramItem

DiagramItem that the mouse is currently over.

Applies to