void GetVisibleRange(Graphics g, out int first, out int last)
{
first = firstItem;
last = 0;
OutlookBarBand band = bands[currentBandIndex];
Rectangle rc = GetViewPortRect();
Rectangle itemRect;
for ( int i = firstItem; i < band.Items.Count; i++ )
{
itemRect = GetItemRect(g, band, i, Rectangle.Empty);
if ( itemRect.Bottom > rc.Bottom )
{
last = i-1;
break;
}
else
{
last = i;
}
}
}