Search
Lanes Grid

The classes from the MindFusion.Diagramming.Wpf.Lanes namespace let you develop process maps and lane diagrams, useful in business process planning and reporting. Processes consist of consecutive operations accomplished by people involved, technical installations, means of contact, and flow of information. The WpfDiagram lane grid features allow indicating and arranging related diagram items in complicated processes and systems, that is, Swim lane diagrams (known as Rummler-Brache diagram), Gantt Charts (planning and scheduling of projects). A lane in the grid can visually contain nodes, links, shapes or images, that represent tasks fulfilled in specified periods of time by people, companies or departments.

The MindFusion.Diagramming.Wpf.Lanes namespace provides the Grid, Header, HeaderCollection and Style classes, the ICell interface and the ResizeType enumeration. These types expose additional properties and methods that let you define your own grids as required by your application logic. Grids can include varying number of lanes, divided into child rows and columns whose intersections form cells. The cells color and style can be customized too.

Use the EnableLanes property of the Diagram class to display lanes in your application. The LaneGrid lets you setup the rows and columns in the grid by defining horizontal and vertical lanes, where each lane can be titled by its own header and/or subheadings. The grid can be resized by setting the ColumnCount and RowCount properties or by adding headers to the ColumnHeaders and RowHeaders collections. A column or row can be divided into child elements by adding to the SubHeaders collection of a Header, which lets you form a complex hierarchy of unlimited depth. The intersection of rows and columns can be either a simple cell for bottommost elements in the hierarchy, or a group of cells for parent rows and columns. Cells or cell groups can be accessed via the grid class Item property, that lets you index cells either by their integer positions, or by their Header objects.

If the AllowResizeHeaders property of the Grid class is enabled, users can resize the grid columns and rows as desired. The CellBoundsChanged event is raised when a cell is resized. An application can handle this event in order to rearrange or resize nodes so that they stay within a specific column or row of the grid.

The position of the grid and grid headers within the diagram is defined via TopMargin and LeftMargin, which specify the grid offset relative to Bounds. HookHeaders enables lane headers to be anchored to the left or right side of the control's visible area. The sizes of headers at different levels in the lane hierarchy can be set in a single operation via the RowHeadersWidths and ColumnHeadersHeights proeprties.

The appearance of the lanes grid can be customized further via the AlignCells property, which specifies whether cells are aligned to each other, the HeadersOnTop poperty, which specifies whether headers should appear on top of the Z-order, and the TopLeftAreaStyle specifying the appearance of the grid's top-left corner.

The Grid class provides many miscalleaneous methods that can be used to find grid elements, for determining their bounds and for hit-testing: FindColumn, FindRow, GetCellBounds, GetCellColumn, GetCellFromPoint, GetCellRow, GetColumn, GetRow, GetRowIndex, GetColumnHeaderBounds, GetColumnIndex, GetHeaderBounds, GetRowHeaderBounds, GetHeaderFromPoint.

The headers in the lanes grid can be customized by using the following properties of the Header class:

Property Name

Description

Height

Gets or sets the height of the header and the related row in the grid.

ResizeType

Gets or sets the resize type of the header.

RotateTitle

Gets or sets a value indicating whether rotating of the header caption at 90 degree is enabled.

Style

Gets or sets the style of the header.

SubHeaders

Gets a collection with the subheaders of the header.

Title

Gets or sets the header caption.

TitleColor

Gets or sets the color of the header caption.

TitleFont

Gets or sets the font of the header caption.

TitleFormat

Gets or sets the alignment format of the header.

Width

Gets or sets the width of the header and the related column in the grid.