Hassan Mokdad
Hassan Mokdad

Reputation: 5902

What is the optimal icon size to use for a Windows Form Application List View item, (Small Icons View)

I am populating a Windows Forms List View with items, and each item is associated with an icon, I tried icons of size 16*16, and 32*32 but the icons seem either stretched or clipped. What is the optimal icon size to use

Upvotes: 3

Views: 7133

Answers (2)

Mizipzor
Mizipzor

Reputation: 52361

Manually assign the ImageSize property on the ImageList and the images wont be resized.

new ImageList { ImageSize = new Size(8, 8) };

Upvotes: 2

Ian
Ian

Reputation: 34489

I believe normally the small list view uses 16x16 icons, I've never had a problem using these. Bear in mind however that the listview uses an ImageList to store these, therefore it's actually storing an Image rather than an Icon. It might be that instead the 32x32 icon is being used and scaled down to 16x16 when you add it which could cause your problem. An easy way to check is to make your icons significantly different and ensure that you get the icon you're expecting.

Upvotes: 3

Related Questions