public ITableRow AddRow(s.TableRowStyle style, t.TrackingInfo trackingInfo) { TableRow row = new TableRow(style, trackingInfo); _rows.Add(row); return(row); }
private void RenderPhotoTable(PhotoTableLayout layout, IContentContainer container) { // Create a table s.TableStyle tableStyle = null; if (layout.Style != null) { s.PhotoStyle photoStyle = (s.PhotoStyle)layout.Style; tableStyle = new s.TableStyle { Border = photoStyle.Border, Padding = photoStyle.Padding }; } int columnWidth = layout.Bounds.Width / layout.NumColumns; int[] columnWidths = new int[layout.NumColumns]; for (int x = 0; x < columnWidths.Length; ++x) { columnWidths[x] = columnWidth; } ITable table = container.AddTable(layout.Bounds.Width, columnWidths, tableStyle, layout.TrackingInfo); // Create a table row for each photo row foreach (PhotoRowLayout photoRow in layout.SubLayouts) { s.TableRowStyle rowStyle = null; if (photoRow.Style != null) { s.PhotoStyle photoStyle = (s.PhotoStyle)photoRow.Style; rowStyle = new s.TableRowStyle { BackColor = photoRow.BackgroundColor, Padding = photoStyle.Padding }; } ITableRow tableRow = table.AddRow(rowStyle, photoRow.TrackingInfo); RenderPhotoRow(photoRow, tableRow); } }
public TableRow(s.TableRowStyle style, t.TrackingInfo trackingInfo) { _cells = new List <TableCell>(); _trackingInfo = trackingInfo; }