ParentAdapter.RemoveParent Method

Replaces the current parent of the specified child with a new parent.

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

Syntax

'Declaration
Public MustOverride Sub RemoveParent ( _
    currentParent As ModelItem, _
    newParent As ModelItem, _
    child As ModelItem _
)
public abstract void RemoveParent(
    ModelItem currentParent,
    ModelItem newParent,
    ModelItem child
)
public:
virtual void RemoveParent(
    ModelItem^ currentParent, 
    ModelItem^ newParent, 
    ModelItem^ child
) abstract
abstract RemoveParent : 
        currentParent:ModelItem * 
        newParent:ModelItem * 
        child:ModelItem -> unit 
public abstract function RemoveParent(
    currentParent : ModelItem, 
    newParent : ModelItem, 
    child : ModelItem
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

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

Remarks

RemoveParent is called by ParentService just before it calls Parent on the new parent’s extension. This method removes the current parent of the specified child by removing the parent-child relationship. RemoveParent examines the new parent and clears any properties on the child that will not be relevant to the new parent.

.NET Framework Security

See Also

Reference

ParentAdapter Class

Microsoft.Windows.Design.Interaction Namespace

ModelParent

ModelItem

Other Resources

WPF Designer Extensibility