private bool AreAllParentsExpanded () { SWF.TreeNode currentParent = node.Parent; while (currentParent != null) { if (!currentParent.IsExpanded) return false; currentParent = currentParent.Parent; } return true; }