In a UserControl, I know that the control will automatically create scrollbars and a scrolling ability when needed. However, how exactly does it decide how big the control's paintable "region" is? (ie, to decide how big to make the scrollbars, and so on).
Is it simply based on painting everything to the e.Graphics element in the OnPaint procedure, at which point the control will decide how big it currently is, and so how much is off screen
I'm asking because I am making a control very similar to the ListView control in Details view. I'm wondering, if I have 1000 items in this control, of which only, lets say, 10 are visible at a time, would I have to draw the entire 1000 items to e.Graphics in order for the control to know how much to draw?
Or is there any possible way to perhaps tell the control, without drawing, the dimensions
Thanks
Yaron