C # Get Project Resources Reference (VS2008)
1 answer
You need to create an instance first ImageList
, see http://msdn.microsoft.com/en-us/library/system.windows.forms.imagelist.aspx (just add it to your control / custom control). Use the property view to load icons into a list of images.
Then assign a list of images to each ListViewItem ( listViewItem.ImageList = imageList
) and set the index of the icon ( listViewItem.ImageIndex = 0
)
Take a look at the notes here for more information: http://msdn.microsoft.com/en-us/library/system.windows.forms.listviewitem.imageindex.aspx
+1
source to share