共用方式為


DropTargetContext.GetTargetBoundingBox 方法

取得目標圖形中元素的全局單位表示相對於左上方的圖表所要的週框方塊。您想要的週框方塊決定透過更新 GroupBoundsRules 的 GhostShapeCollection。如果無法取得目標的週框方塊中,這個方法會傳回 RectangleD.Empty。

命名空間:  Microsoft.VisualStudio.Modeling.Diagrams
組件:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0 (在 Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll 中)

語法

'宣告
Public Shared Function GetTargetBoundingBox ( _
    transaction As Transaction, _
    targetShapeElementId As Guid _
) As RectangleD
public static RectangleD GetTargetBoundingBox(
    Transaction transaction,
    Guid targetShapeElementId
)

參數

  • targetShapeElementId
    型別:System.Guid
    目標圖形項目,為其取得範圍的 Guid。

傳回值

型別:Microsoft.VisualStudio.Modeling.Diagrams.RectangleD

.NET Framework 安全性

請參閱

參考

DropTargetContext 類別

Microsoft.VisualStudio.Modeling.Diagrams 命名空間