Original question (see Update below)
I have a WinForms program that needs a decent scrollable icon control with large icons (in fact, the size of the icon is 128x128 or more), which you can click halfway around or double click to perform an action. It is preferable that there is minimal wasted space (under each icon short file headers might be required; if the file name is too long, I can add an ellipsis).

(source: updike.org )
I tried using ListView with LargeIcon (default .View) and the results are disappointing:

(source: updike.org )
Perhaps I'm filling in the control incorrectly? The code:
ImageList ilist = new ImageList(); this.listView.LargeImageList = ilist; int i = 0; foreach (GradorCacheFile gcf in gc.files) { Bitmap b = gcf.image128; ilist.Images.Add(b); ListViewItem lvi = new ListViewItem("text"); lvi.ImageIndex = i; this.listView.Items.Add(lvi); i++; }
I need large icons with a little empty space, not a big empty space with embarrassingly small icons.
- Is there a .NET control that does what I need?
- Is there a favorite third-party control that does this?
- If not, what control is best inherited and configured to make it work?
- Should I break down and create my own control (with which I have a lot of experience ... I just do not want to go to such an extreme state, as this is somewhat connected).
I found this tutorial about OwnerDraw, but working with it is basically 3 or 4 above, as this demo just shows how to animate the lines in a detailed view.
Refresh
Adding a line
ilist.ImageSize = new Size(128, 128);
before the for loop fixed the size problem, but now the images are paletted to 8-bit (looks like system colors?), although the debugger shows that the images are inserted into ImageList as 24bpp System.Drawing.Bitmap's:

(source: updike.org )
- How can I (can I?) Force images to display in full 24-bit color?
- The spacing between the icons is still pretty wasteful ... how to fix it? May I?
Update 2
Together with the addition of a line
ilist.ColorDepth = ColorDepth.Depth24Bit;
Then, after setting ilist.ImageSize, I followed the advice of the arbiter and changed the interval:
[DllImport("user32.dll")] public static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam); public int MakeLong(short lowPart, short highPart) { return (int)(((ushort)lowPart) | (uint)(highPart << 16)); } public void ListView_SetSpacing(ListView listview, short cx, short cy) { const int LVM_FIRST = 0x1000; const int LVM_SETICONSPACING = LVM_FIRST + 53;
The ListView control may not be ideal or have default values, as I expected (for example, the Spacing property), but I'm glad I could tame it at the end:

(source: updike.org )
By the way, in order to maintain the correct aspect ratio for the thumbnails, I needed to create my own 128x128 bitmaps, clear the background to fit the control, and center these images:
public void CenterDrawImage(Bitmap target, Color background, Bitmap centerme) { Graphics g = Graphics.FromImage(target); g.Clear(background); int x = (target.Width - centerme.Width) / 2; int y = (target.Height - centerme.Height) / 2; g.DrawImage(centerme, x, y); g.Dispose(); }