private void _Cells_ItemsAdded(object sender, NotifyCollectionChangedEventArgs e) { if (sender is CellCollection) { foreach (Cell cell in e.NewItems) { if (cell.Row > Rows.Count) { Rows.Create(cell.Row - Rows.Count); } if (cell.Column > Columns.Count) { Columns.Create(cell.Column - Columns.Count); } } } }