public Grid(SpriteFont headerFont, SpriteFont rowsFont, Color columnHeaderColor, Vector2 position, bool textShadow, GridColumns gridColumns) { RowsFont = rowsFont; Position = position; ColumnsDefinitions = gridColumns; Columns = new GridColumnRow(this, headerFont, columnHeaderColor, textShadow, gridColumns); Rows = new GridRows(); }
public GridRow(Grid parent, SpriteFont font, Color color, GridColumns gridColumns) { Items = new List <Label>(); float y = (parent.Position.Y + 25.0f) + (parent.Rows.Count * 15.0f); foreach (GridColumn gridColumn in gridColumns) { float x = gridColumn.X; var label = new Label(font, VerticalAlignment.Top, gridColumn.HorizontalAlignment, new Vector2(x, y), gridColumn.Text, color); Items.Add(label); } }
public GridColumnRow(Grid parent, SpriteFont font, Color color, bool textShadow, GridColumns gridColumns) { Items = new List <Label>(); float y = parent.Position.Y; foreach (GridColumn gridColumn in gridColumns) { float x = gridColumn.X; var label = new Label(font, VerticalAlignment.Top, gridColumn.HorizontalAlignment, new Vector2(x, y), gridColumn.Text, color) { TextShadow = textShadow }; Items.Add(label); } }