public Box AddCell(string text, Font font, Brush brush) { var box = new StringBox { Text = text, Font = font, Brush = brush }; Cells.Add(box); return(box); }
public Box AddCell(string text) { var box = new StringBox { Text = text }; Cells.Add(box); return(box); }
public virtual Box GetEntityBox(DiagramTableItem item, Dictionary <int, Box> colNameBoxes) { var panel = new PanelBox { Orientation = Orientation.Vertical }; panel.BorderAllBrush = Brushes.Black; var header = new StringBox { Text = item.Table.Name, Font = GetHeaderFont(), Brush = Brushes.Black }; panel.Boxes.Add(header); var table = new TableBox(); table.HAlign = BoxModelAlignement.Fill; FillColumnsTable(item, colNameBoxes, table); panel.Boxes.Add(table); header.BorderBottom = 1; header.PadLeft = header.PadRight = 3; FillHeader(header); panel.BorderAll = 1; panel.BorderAllBrush = Brushes.Black; panel.BackgroundBrush = Brushes.White; var es = item.GetCurrentEntityStyle(); if (es.IsDefinedHeader) { header.Gradient = es.HeaderBg; table.Gradient = es.BodyBg; } else { panel.Gradient = es.BodyBg; } return(panel); }
protected override void FillHeader(StringBox header) { header.PadTop = header.PadBottom = 3; }
protected override void FillHeader(StringBox header) { header.BorderBottom = 2; header.HAlign = BoxModelAlignement.Center; header.BorderBottomBrush = Brushes.Gray; }
protected virtual void FillHeader(StringBox header) { }