public Rectangle GetRowBounds(int rowNo)
{
if (rowNo >= _rowCache.Count)
{
int count = _rowCache.Count;
int y = count > 0 ? _rowCache[count - 1].Bottom : 0;
for (int i = count; i <= rowNo; i++)
{
int height = GetRowHeight(i);
_rowCache.Add(new Rectangle(0, y, 0, height));
y += height;
}
if (rowNo < _rowCache.Count - 1)
return Rectangle.Empty;
}
if (rowNo >= 0 && rowNo < _rowCache.Count)
return _rowCache[rowNo];
else
return Rectangle.Empty;
}