In a C# WinForms application, I have a ListView in virtual mode where I will set the virtual list size to potentially many hundred or thousands. The ListView also shows an image for each item.
The images for each item come from a server and arrive asynchronously. There is a bug in WinForms where images must be associated by index, and not key in a virtual ListView. See: How to show icon on all listview items in virtual mode (C#)
The problem I have is that I don't see any way to add images, by index, to the ImageList other than sequentially (via the Add method). My images may arrive out of order, or the user may scroll quickly to the end of the ListView, requiring me to add images associated with a large index before images with smaller indices exist.
I've tried adding null images, with the intent of setting the actual image by index later, but this is illegal.
How can one do this? This kind of functionality is exhibited all the time in the Windows file viewer where one views a directory containing a large number of images. Thumbnails show up asynchronously. I'm essentially wanting to emulate this behavior.