Example #1
0
 public void MoveNodeToUnderParent(ITreeItem newParent, ITreeItem nodeToMove)
 {
     if (newParent == null)
     {
         throw new ArgumentNullException(nameof(newParent));
     }
     if (newParent.IsDescendantOf(nodeToMove))
     {
         return;
     }
     nodeToMove.Parent.RemoveChild(nodeToMove);
     newParent.AddChild(nodeToMove);
 }