public GridRowViewModel(TRowEntity paramKey, RowSettings <TRowEntity, TCellEntity> paramRowSettings, int capacity, IEnumerable <ColumnSettings <TCellEntity> > paramColumnSettings ) { List <CellViewModel <TCellEntity> > list = new List <CellViewModel <TCellEntity> >(); for (int i = 0; i < capacity; i++) { foreach (var cs in paramColumnSettings) { list.Add(new CellViewModel <TCellEntity>(cs)); } } _observableGrouping = new ObservableGrouping <TRowEntity, CellViewModel <TCellEntity> >(paramKey, list); colSettingsCount = paramColumnSettings.Count(); _rowSettings = paramRowSettings; }
public GridViewModelBase( List <LegendItem> paramLegend, string paramName, string paramCornerText, Func <IEnumerable <TColumnEntity> > paramcolumnsGetter, Func <IEnumerable <TRowEntity> > paramrowsGetter, Func <IEnumerable <TCellEntity> > paramcellsGetter, Func <TCellEntity, int[]> paramcellXYGetter, List <ColumnSettings <TColumnEntity, TCellEntity> > paramColumnSettings, RowSettings <TRowEntity, TCellEntity> paramRowSettings ) { legend = paramLegend; name = paramName; cornerText = paramCornerText; _columnSettings = paramColumnSettings; rowSettings = paramRowSettings; _columnsGetter = paramcolumnsGetter; _rowsGetter = paramrowsGetter; _cellsGetter = paramcellsGetter; _cellXYGetter = paramcellXYGetter; }