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
- currentParent
Type: Microsoft.Windows.Design.Model.ModelItem
The item that is currently the parent of child.
- newParent
Type: Microsoft.Windows.Design.Model.ModelItem
The item that will become the new parent of child.
- child
Type: Microsoft.Windows.Design.Model.ModelItem
The child item.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design.Interaction Namespace