The Detach method is called on a child IAttachable to detach it from its Parent. Calling Detach has two effects:
- Sets the calling IAttachable’s ParentAsIAttachable (or Parent if using a PositionedObject) to null.
- Removes the calling IAttachble from its parent’s ChildrenAsIAttachables list (or Children if using a PositionedObject).
Assuming that childObject is attached to something, you can detach its follows: