Search
GridLayout Class
Remarks See Also
 






Implements a grid graph layout algorithm.

Namespace: MindFusion.Diagramming.Layout
Assembly: MindFusion.Diagramming

 Syntax

C#  Copy Code

public class GridLayout : Layout

Visual Basic  Copy Code

Public Class GridLayout
    Inherits Layout

 Remarks

GridLayout arranges diagram nodes in a grid, keeping connected nodes close together. The algorithm strives to achieve a small number of link crossings. It is based on an iterative process whose initial steps shuffle the grid nodes randomly. That can lead to very different results each time the algorithm is run.

To apply the layout to a diagram, create a GridLayout instance, set its members and invoke the Arrange method. Arrange lays out all subgraphs in a diagram, unless the Root property is set.

The distance between points in the layout grid can be changed through GridSize. Nodes to be placed at the upper-left and lower-right corners of the grid can be assigned to StartNode and EndNode.

Anchoring specifies whether the layout algorithm must attach links to the anchor points of graphs nodes. The grid layout algorithm produces best results if it can place link ends at arbitrary positions over nodes' outlines, that is, when using the Ignore value. If your application logic requires links to be always attached to anchor points, use the other two values. In such cases Reassign would yield better results.

 Inheritance Hierarchy

System.Object
    MindFusion.Diagramming.Layout.Layout
        MindFusion.Diagramming.Layout.GridLayout

 See Also