取得指定項目之父代的界限。
命名空間: Microsoft.Windows.Design.Interaction
組件: Microsoft.Windows.Design.Interaction (在 Microsoft.Windows.Design.Interaction.dll 中)
語法
'宣告
Public MustOverride Function GetPlacementBoundary ( _
item As ModelItem, _
intent As PlacementIntent, _
ParamArray positions As RelativeValue() _
) As Rect
public abstract Rect GetPlacementBoundary(
ModelItem item,
PlacementIntent intent,
params RelativeValue[] positions
)
public:
virtual Rect GetPlacementBoundary(
ModelItem^ item,
PlacementIntent intent,
... array<RelativeValue>^ positions
) abstract
abstract GetPlacementBoundary :
item:ModelItem *
intent:PlacementIntent *
positions:RelativeValue[] -> Rect
public abstract function GetPlacementBoundary(
item : ModelItem,
intent : PlacementIntent,
... positions : RelativeValue[]
) : Rect
參數
- item
型別:Microsoft.Windows.Design.Model.ModelItem
要尋找的項目父代界限。
- intent
型別:Microsoft.Windows.Design.Interaction.PlacementIntent
指定這個定位呼叫的原因。
- positions
型別:array<Microsoft.Windows.Design.Interaction.RelativeValue[]
要設定的定位位置陣列。
傳回值
型別:System.Windows.Rect
Rect ,表示 item 之父代的界限。
例外狀況
| 例外狀況 | 條件 |
|---|---|
| ArgumentNullException | item 為 nullNull 參照 (即 Visual Basic 中的 Nothing)。 |
備註
PlacementIntent 由定位配接器用來填入指定之定位的位置中缺少的值。 例如,如果 PlacementIntent 是 Move,而且您傳送了 LeftSide 的值,而不是 RightSide,則定位配接器會調整右側,這樣控制項的大小就會維持不變。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。
請參閱
參考
Microsoft.Windows.Design.Interaction 命名空間