Simplified Cell Layout in a Panel
ComponentOne Grid for WPF's C1DataGrid control provides a simplified way to lay out item cells in Panels which define placement of their child elements via attached properties. For example, in a Grid panel with its Row, ColumnSpan, and RowSpan properties and in a Canvas panel with its Left and Top properties. To define a cell placement, just assign the necessary panel's attached properties to a Column object that the cell represents: to lay out cells by means of the Grid panel, you can just assign the Grid panel with necessary number of column and rows to the CellsAutoLayoutPanelTemplate property, and define the cell placement in the panel by assigning Grid's Row, Column, RowSpan, and ColumnSpan attached properties to the Column objects from the Columns collection.
For example, the C1DataGrid control includes the following Layout properties when located within a Grid panel:
You can change the sizing, alignment, and location of the C1DataGrid within the Grid panel.
|