private static void ExpandUp(TreeNode node) { if (node.Parent == null) return; node.Parent.Expand(); ExpandUp(node.Parent); }