Share via


ParentAdapter.Parent Method (ModelItem, ModelItem)

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 MustOverride Sub Parent ( _
    newParent As ModelItem, _
    child As ModelItem _
)
public abstract void Parent(
    ModelItem newParent,
    ModelItem child
)
public:
virtual void Parent(
    ModelItem^ newParent, 
    ModelItem^ child
) abstract
abstract Parent : 
        newParent:ModelItem * 
        child:ModelItem -> unit 
public abstract function Parent(
    newParent : ModelItem, 
    child : ModelItem
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

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

Remarks

Use Parent 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