C# ListView Item Image -
how can add image (specified image) listview foreach statement example:
foreach(video entry in videofeed.entries) { listview1.items.add(entry); listview1.items.image(imageurl); }
if want show image listviewitem, need create imagelist, fill images, assign imagelist listview , tell every listviewitem image list use:
var listview = new listview(); // create image list , fill var imagelist = new imagelist(); imagelist.images.add("itemimagekey", image); // tell listview use new image list listview.largeimagelist = imagelist; // add item var listviewitem = listview.items.add("item image"); // , tell item image use listviewitem.imagekey = "itemimagekey";
you can read more listviewitem , how set/use images in msdn article or in msdn tutorial.
Comments
Post a Comment