次の方法で共有


ParentAdapter.Parent メソッド (ModelItem, ModelItem, Int32)

オブジェクトの親を別の親に変更します。

名前空間:  Microsoft.Windows.Design.Interaction
アセンブリ:  Microsoft.Windows.Design.Interaction (Microsoft.Windows.Design.Interaction.dll 内)

構文

'宣言
Public Overridable Sub Parent ( _
    newParent As ModelItem, _
    child As ModelItem, _
    insertionIndex As Integer _
)
public virtual void Parent(
    ModelItem newParent,
    ModelItem child,
    int insertionIndex
)
public:
virtual void Parent(
    ModelItem^ newParent, 
    ModelItem^ child, 
    int insertionIndex
)
abstract Parent : 
        newParent:ModelItem * 
        child:ModelItem * 
        insertionIndex:int -> unit 
override Parent : 
        newParent:ModelItem * 
        child:ModelItem * 
        insertionIndex:int -> unit 
public function Parent(
    newParent : ModelItem, 
    child : ModelItem, 
    insertionIndex : int
)

パラメーター

  • insertionIndex
    型: System.Int32
    子コレクション内のコントロールの順序。

例外

例外 条件
ArgumentNullException

newParent または child が nullnull 参照 (Visual Basic では Nothing) です。

解説

Parent メソッドを使用して、親子関係を設定します。

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

ParentAdapter クラス

Parent オーバーロード

Microsoft.Windows.Design.Interaction 名前空間

ModelParent

ModelItem

その他の技術情報

WPF デザイナーの機能拡張