Compartilhar via


DropTargetContext.GetTargetBoundingBox(Transaction, Guid) Method

Definition

Gets the desired bounding box of the target shape element in world units relative to the top-left of the diagram. The desired bounding box is determined via the GhostShapeCollection updated by GroupBoundsRules. This method returns RectangleD.Empty if it wasn't able to get the target bounding box.

public:
 static Microsoft::VisualStudio::Modeling::Diagrams::RectangleD GetTargetBoundingBox(Microsoft::VisualStudio::Modeling::Transaction ^ transaction, Guid targetShapeElementId);
public static Microsoft.VisualStudio.Modeling.Diagrams.RectangleD GetTargetBoundingBox (Microsoft.VisualStudio.Modeling.Transaction transaction, Guid targetShapeElementId);
static member GetTargetBoundingBox : Microsoft.VisualStudio.Modeling.Transaction * Guid -> Microsoft.VisualStudio.Modeling.Diagrams.RectangleD
Public Shared Function GetTargetBoundingBox (transaction As Transaction, targetShapeElementId As Guid) As RectangleD

Parameters

transaction
Transaction

The transaction to check for the drop target context.

targetShapeElementId
Guid

The Guid of the target shape element for which to get the bounds.

Returns

The absolute bounding box of the target shape element. If the target bounding box wasn't available, then this method returns RectangleD.Empty.

Applies to