MindFusion.Wpf Pack Programmer's Guide
Grid Class
Remarks See Also
 





Represents a lane grid.

Namespace: MindFusion.Diagramming.Wpf.Lanes
Assembly: MindFusion.Diagramming.Wpf

 Syntax

C#  Copy Code

public class Grid : ITextAttributes

Visual Basic  Copy Code

Public Class Grid
    Implements ITextAttributes

 Remarks

The Grid class lets you define a background grid or table that can be used in Swimlane diagrams or Gantt charts. To activate the grid, set the EnableLanes property of the Diagram class to true.

Grids can include varying number of lanes, divided into child rows and columns whose intersections form cells. 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 lane hierarchy, or a group of cells for parent rows and columns. Cells or cell groups can be accessed via the 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 lane cell bounds are resized.

The position of the grid and grid headers within the diagram document is defined via TopMargin and LeftMargin, which specify the grid offset relative to Bounds. 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 miscellaneous methods that can be used to find grid elements, for determining their bounds and for hit-testing.

 Inheritance Hierarchy

System.Object
    MindFusion.Diagramming.Wpf.Lanes.Grid

 See Also

Grid Members
MindFusion.Diagramming.Wpf.Lanes Namespace