Diagram / Layouts / Graph Regions and Regions Layouts
In This Topic
    Graph Regions and Regions Layouts
    In This Topic

    Graph and tree layouts deal with the automatic arrangement of the connected components of graphs. Two vertices are in the same connected component (also called region), if and only if there exists a path between them.

    Both tree and graph layout generally performs the following steps:

    1. Split the input graph into regions. For tree layouts this step produces a set of trees. For graph layouts this step produces a set of connected graphs.
    2. Invoke the primary layout method for each of these regions - that is arrange the objects in each region. 
    3. Finally, layout the regions with a cells layout.

    All types of graph and tree layouts derive from the base NGraphLayoutBase<T> class. This class is responsible for the arrangement of the graph regions, via  a box layout accessible from its RegionLayout property. By default this property holds an instance of the NFlowLayout class.

    The following image illustrates the result of a symmetrical layout over the four connected components of a graph, which were finally arranged with a flow layout:

    Because of the final region arrangement step, all positions assigned by the primary layout algorithm of graph parts layouts are relative to the currently arranged region.