private void OnParentRemovingChild(object sender, TreeNodeEventArgs e)
{
// Setup initial conditions.
if (e.Node != node) return;
// Slide the list-tree back to the next remaining parent.
if (parentList.RootNode != null)
{
ITreeNode ancestor = Helper.Tree.FirstRemainingParent(parentList.RootNode, node);
parentList.SelectedParent = ancestor ?? parentList.RootNode;
}
// The node for this panel has been removed. Dispose of the panel.
Dispose();
}
#endregion