public void LoadCell(IGnosisGridHeaderFieldImplementation header, int column, int row, int colSpan, int rowSpan) { GnosisGridHeaderField headerWPF = (GnosisGridHeaderField)header; Grid.SetColumn(headerWPF, column); Grid.SetColumnSpan(headerWPF, colSpan); Grid.SetRow(headerWPF, row); Grid.SetRowSpan(headerWPF, rowSpan); gridContent.Children.Add(headerWPF); }
public void AddGridHeader(IGnosisGridHeaderFieldImplementation gridHeaderFieldImplementation, int column, int row, int colSpan, int rowSpan, bool columnarFormat) { if (colSpan == 0) { return; } GnosisGridHeaderField header = (GnosisGridHeaderField)gridHeaderFieldImplementation; //string xaml = XamlWriter.Save(header.Style); Grid.SetColumn(header, column); Grid.SetColumnSpan(header, colSpan); Grid.SetRow(header, row); Grid.SetRowSpan(header, rowSpan); if (columnarFormat) { //while (gridContent.RowDefinitions.Count() < row + rowSpan) //{ // RowDefinition rowdef = new RowDefinition(); // rowdef.Height = new GridLength(controller.StyleManager.GetFieldHeight(), GridUnitType.Pixel); // gridContent.RowDefinitions.Add(rowdef); //} gridContent.Children.Add(header); } else { //while (gridHeaders.RowDefinitions.Count() < row + rowSpan) //{ // RowDefinition rowdef = new RowDefinition(); // rowdef.Height = new GridLength(1, GridUnitType.Auto); // gridHeaders.RowDefinitions.Add(rowdef); //} gridHeaders.Children.Add(header); } }