private RowIndexAtExact ( int yPosition ) : int | ||
yPosition | int | |
return | int |
private int RowIndexAtExact(int yPosition)
{
int height = 0;
for (int i = 0; i < this.Rows.Count; i++)
{
height += this.Rows[i].Height;
if (yPosition < height)
return i;
}
// If we've got this far then its the last row
return this.Rows.Count - 1;
}