public void Remove(TreeNode node) { if (node.Parent != null) { node.Parent.Remove(node); return; } _rootNodes.Remove(node); node.RemoveFromTree(this); InvalidateHierarchy(); }
public void Remove(TreeNode node) { _children.Remove(node); if (!_expanded) { return; } Tree tree = Tree; if (tree == null) { return; } node.RemoveFromTree(tree); if (_children.Count == 0) { _expanded = false; } }
public void Remove(TreeNode node) { _children.Remove(node); if (!_expanded) return; Tree tree = Tree; if (tree == null) return; node.RemoveFromTree(tree); if (_children.Count == 0) _expanded = false; }