I don't know what I'm doing wrong, but my code is quite similar to this one and I cannot make it to work. The images do not show, no matter what.
var listView = new ListView();
var imageList = new ImageList();
imageList.Images.Clear();
listView.Items.Clear();
var imagenes = Directory.GetFiles(csGlobal.rutaImagenes, "*.jpg", SearchOption.TopDirectoryOnly).OrderBy(f => f);
imageList.ImageSize = new Size(32, 32);
foreach (var image in imagenes)
{
Bitmap img = new Bitmap(image);
imageList.Images.Add(img);
}
listView.View = View.LargeIcon;
listView.LargeImageList = imageList;
for (int j = 0; j < imageList.Images.Count; j++)
{
ListViewItem item = new ListViewItem();
item.ImageIndex = j;
listView.Items.Add(item);
}
edited fixed setting OwnerDraw to false (01/03/2017)