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
)
參數
- transaction
型別:Microsoft.VisualStudio.Modeling.Transaction
若要檢查的置放目標內容交易。
- targetShapeElementId
型別:System.Guid
目標圖形項目,為其取得範圍的 Guid。
傳回值
型別:Microsoft.VisualStudio.Modeling.Diagrams.RectangleD
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。