Method ReplaceChild
- Namespace
- PaintDotNet.Direct2D1
- Assembly
- PaintDotNet.Windows.dll
ReplaceChild(ISvgElement, ISvgElement)
Replaces the oldChild element with the newChild. This operation removes the oldChild from the tree. If the newChild element already has a parent, it is removed from this parent as part of the replace operation.
void ReplaceChild(ISvgElement newChild, ISvgElement oldChild)
Parameters
newChild
ISvgElementThe element to be inserted.
oldChild
ISvgElementThe child element to be replaced. The oldChild element must be an immediate child of this element.
Remarks
Throws an exception if this element cannot accept children of the type of newChild.
Throws an exception if the newChild is an ancestor of this element.