private void Arrange(GridItemViewModel item) { int col; int row; int colSpan; int rowSpan = 1; do { col = random.Next(5); colSpan = random.Next(4 - col) + 1; row = random.Next(5); } while (!EmptyCells(col, colSpan, row, rowSpan)); item.Col = col; item.ColSpan = colSpan; item.Row = row; item.RowSpan = rowSpan; }
public void DeleteItem(GridItemViewModel item) { items.Remove(item); }