private void UpdateCells() { var temp = new Cell[Cells.Columns, Cells.Rows]; for (int x = 0; x < Cells.Columns; x++) { for (int y = 0; y < Cells.Rows; y++) { //var currentCell = Cells[x, y]; var neighbors = GetNeighborColors(x, y); var newCell = CalculateAverage(neighbors, Cells[x, y]); temp[x, y] = newCell; if (newCell != Cells[x, y]) { IsComplete = false; } } } Cells.CollectionUpdate(temp); }