private ITreeNode GetRoot() { if (IsRoot) return null; ITreeNode parentNode = Parent; do { if (parentNode == null) break; if (parentNode.IsRoot) return parentNode; parentNode = parentNode.Parent; } while (parentNode != null); return null; }