public void Unfocus(IContainerNode containerBaseNode) { // Show all inside and neighbors of parent containerBaseNode.GetParent().SetHiddenRecursive(false); var parentContainerBaseNode = containerBaseNode.GetParent() as IContainerNode; if (parentContainerBaseNode != null) { foreach (var neighborNode in parentContainerBaseNode.GetLinkedNodes <IBaseNode>(true)) { neighborNode.Hidden = false; } } //show all children of ancestors with IsExpandedByDefault while (parentContainerBaseNode != null && parentContainerBaseNode.IsExpandedByDefault) { parentContainerBaseNode.SetHiddenRecursive(false); parentContainerBaseNode = parentContainerBaseNode.GetParent() as IContainerNode; } // Collapse node and arrange its neighborhood nodes containerBaseNode.Collapse(100); containerBaseNode.PostLayoutStep(); _view.Refresh(); }