The icons in the ListView in C# are very small by default (probably 16x16px). How can I increase the size of these icons?
I tried making the source images in the ImageList larger, and also tried using the LargeImageList property, but to no avail.
I'm using C#, WinForms and .net 4.0.
The trick is in modifying the ImageSize propertiy of the ImageList (who would've thought)?
listView1.View = View.LargeIcon;
ImageList iList = new ImageList();
iList.ImageSize = new Size(64, 64);
iList.ColorDepth = ColorDepth.Depth32Bit;
listView1.LargeImageList = iList;
As a bonus, remember to set the View property of the ListView to be LargeIcon and also increase the ColorDepth (if you so desire).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With