Populating a FlowLayoutPanel with a large number of controls and painting thumbnails on demand
问题 I'm trying to make an ImageListBox kind of control that will display a large numbers of thumbnails, like the one that Picasa uses. This is my design: I have a FlowLayoutPanel that is populated with a lot of UserControl objects, for example 4,000. Each UserControl is assigned a delegate for the Paint event. When the Paint event is called, it checks a memory cache for the thumbnail and if the image is not in cache, it retrieves it from the disk. I have two problems that I'm trying to solve: It