Share via


ParentAdapter.Parent Method (ModelItem, ModelItem, Int32)

Changes the parent of an object to another parent.

Namespace:  Microsoft.Windows.Design.Interaction
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
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
)

Parameters

  • insertionIndex
    Type: System.Int32
    The order of control in the children collection.

Exceptions

Exception Condition
ArgumentNullException

newParent or child is nulla null reference (Nothing in Visual Basic).

Remarks

Use the Parent method to set up parent-child relationships.

.NET Framework Security

See Also

Reference

ParentAdapter Class

Parent Overload

Microsoft.Windows.Design.Interaction Namespace

ModelParent

ModelItem

Other Resources

WPF Designer Extensibility