SidebarLibrary.WinControls.OutlookBar.DrawItems C# (CSharp) Method

DrawItems() private method

private DrawItems ( Graphics g, Rectangle targetRect, OutlookBarBand drawBand ) : void
g System.Drawing.Graphics
targetRect System.Drawing.Rectangle
drawBand OutlookBarBand
return void
		void DrawItems(Graphics g, Rectangle targetRect, OutlookBarBand drawBand)
		{

			// If we don't have any bands just return
			if ( bands.Count == 0 )	return;

			Rectangle rc = GetViewPortRect();
			OutlookBarBand band = bands[currentBandIndex];
			if ( drawBand != null ) band = drawBand;
			Debug.Assert(band != null);
			for ( int i = firstItem; i < band.Items.Count; i++ )
			{
				Rectangle itemRect = GetItemRect(g, band, i, targetRect);
				if ( itemRect.Top > rc.Bottom )
					break;
				else
					DrawItem(g, i, itemRect, false, false, targetRect, drawBand);
			}
		}