GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoSubGraph Class / Collapse Method
In This Topic
    Collapse Method (GoSubGraph)
    In This Topic
    Reposition all of the children so that this node takes a minimum amount of space.
    Syntax
    public virtual void Collapse()
    Remarks
    This method will first set the State to GoSubGraphState.Collapsing. It then calls PrepareCollapse, which collapses any nested subgraphs. It will call ComputeReferencePoint to determine the reference position for the collapsed subgraph. Then it will call ComputeCollapsedSize to determine the desired size of the collapsed subgraph, will call SaveChildBounds to remember the expanded size and relative position of each child, will call CollapseChild to actually move and perhaps resize each child, and then will call FinishCollapse. It then sets the state to GoSubGraphState.Collapsed. Afterwards, IsExpanded will be false, and this method calls LayoutChildren(null) to give LayoutLabel, LayoutHandle, and LayoutPort a chance. This method does nothing if this node is already collapsed or if Collapsible is false.
    See Also