public void Map(Scaffold SC) { float y = 0; int[] a = SC.RowsAndCollumns.ToKeyArray(); int RB = 0; foreach (int i in SC.RowsAndCollumns.KeyArray) { List <long> ll = SC.RowsAndCollumns[i]; FloatPoint maxRowHeight = SC.GetRowMaxHeight(data, ll.ToArray()); float xBegin = 0; foreach (long lX in SC.RowsAndCollumns[i]) { RectangleF rf = new RectangleF(xBegin, y + AutoScrollPosition.Y, data[lX].Width, data[lX].Height), rx = rf; xBegin += data[lX].Width; RB++; } y += maxRowHeight.Y; } a = null; AutoScrollMinSize = new FloatPoint(0, y + 1); }