Replace RackGrid.ComputeResize with this:

// it can be resized only in positive multiples of Item.UnitSize

public override RectangleF ComputeResize(RectangleF origRect, PointF newPoint, int handle, SizeF min, SizeF max, bool reshape) {

RectangleF r = base.ComputeResize(origRect, newPoint, handle, min, max, reshape);

Rack rack = this.Parent as Rack;

if (rack != null) {

RectangleF rMin = new RectangleF();

bool any = false;

foreach (GoObject obj in rack.GetEnumerator()) {

if (obj is Item) {

if (!any) {

rMin = obj.Bounds;

any = true;

}

else {

// add the object’s bounding rect to this one

rMin = UnionRect(rMin, obj.Bounds);

}

}

}

if (any) r = UnionRect(r, rMin);

}

r.Width = Math.Max(1, (float)Math.Round(r.Width / Item.UnitSize)) * Item.UnitSize;

r.Height = Math.Max(1, (float)Math.Round(r.Height / Item.UnitSize)) * Item.UnitSize;

return r;

}

static RectangleF UnionRect(RectangleF a, RectangleF b) {

float minx = Math.Min(a.X, b.X);

float miny = Math.Min(a.Y, b.Y);

float maxr = Math.Max(a.X + a.Width, b.X + b.Width);

float maxb = Math.Max(a.Y + a.Height, b.Y + b.Height);

return new RectangleF(minx, miny, maxr - minx, maxb - miny);

}