public void EditGridDefinition() { if (!FociList.Any()) { return; } Focus biggestY = FociList.Aggregate((i1, i2) => i1.Y > i2.Y ? i1 : i2); Focus biggestX = FociList.Aggregate((i1, i2) => i1.X > i2.X ? i1 : i2); RowCount = biggestY.Y >= RowCount ? biggestY.Y + 1 : RowCount; ColumnCount = biggestX.X >= ColumnCount ? biggestX.X + 1 : ColumnCount; }
public void EditGridDefinition() { if (!FociList.Any()) { return; } FocusModel biggestY = FociList.Aggregate((i1, i2) => i1.DisplayY > i2.DisplayY ? i1 : i2); FocusModel biggestX = FociList.Aggregate((i1, i2) => i1.DisplayX > i2.DisplayX ? i1 : i2); RowCount = biggestY.DisplayY >= RowCount ? biggestY.DisplayY + 1 : RowCount; ColumnCount = biggestX.DisplayX >= ColumnCount ? biggestX.DisplayX + 1 : ColumnCount; }