Represents a lane grid.
Namespace: MindFusion.Diagramming.Lanes
Assembly: MindFusion.Diagramming.Silverlight
C# Copy Code |
---|
public class Grid : INotifyPropertyChanged |
Visual Basic Copy Code |
---|
Public Class Grid |
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 by 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 by 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 by using the RowHeadersWidths and ColumnHeadersHeights proeprties.
The appearance of the lanes grid can be customized further in 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.
System.Object
MindFusion.Diagramming.Lanes.Grid