public GridLayout GetGridLayout()
 {
     var result = new GridLayout(12);
     result.AddRow().AddCell(12, "Top", "Top", GridLayoutCellType.Placeholder);
     var contentRow = result.AddRow();
     contentRow.AddCell(9, "Main", "Main", GridLayoutCellType.Placeholder);
     contentRow.AddCell(3, "Right", "Right", GridLayoutCellType.Placeholder);
     result.AddRow().AddCell(12, "Bottom", "Bottom", GridLayoutCellType.Placeholder);
     return result;
 }
Example #2
0
 private static LinqIt.Components.GridLayout GetWidePageLayout(int columns)
 {
     var result = new GridLayout(12);
     result.AddRow().AddCell(12, "Top", "Top", GridLayoutCellType.Placeholder);
     var contentRow = result.AddRow();
     for (int i = 1; i <= columns; i++)
     {
         contentRow.AddCell(12 / columns, "Col" + i, "Column " + i, GridLayoutCellType.Placeholder);
     }
     result.AddRow().AddCell(12, "Bottom", "Bottom", GridLayoutCellType.Placeholder);
     return result;
 }
        public GridLayout AddGridCell(int columnSpan)
        {
            var totalSpan = _cells.Select(c => c.ColumnSpan).Sum() + columnSpan;
            if (totalSpan > _layout.ColumnSpan)
                throw new ArgumentException("Cannot add cell, as the combined row span would be larger than " + _layout.ColumnSpan);

            var cell = new GridLayout(columnSpan);
            _cells.Add(cell);
            return cell;
        }
 internal GridRow(GridLayout layout)
 {
     _layout = layout;
 }