private static RowCollection CloneRows(GridPanel panel) { RowCollection rows = new RowCollection(panel, (int) panel.Rows.DefaultSize); using (rows.DeferNotifications()) { foreach (Row row in panel.Rows) { rows.Add(row); row.List = panel.Rows; } } rows.MinSize = panel.Rows.MinSize; return rows; }