C # listview set the element row height

C # listview to add pictures by binding imagelist

1. First drag the toolbar controls come in a imageList "imageList1";
2. Add a picture of the items to listview:
public void ArrayImage (String [] the ImagePath)
{
this.listView1.Items.Clear ();
this.imageList1.Images. the Clear ();
for (int I = 0; I <ImagePath.Count; I ++)
{
this.imageList1.Images.Add (the Image.FromFile (the ImagePath [I]));
listView1.Items.Add (the ImagePath [I]) ;
listView1.Items [I] = I .ImageIndex;
}
}
images are displayed by setting the change of view and listview LargeImage and SmallImage properties.
view: Right-similar windows "View" display item;
LargeImage and SmallImage: choose according to different view options.

Guess you like

Origin www.cnblogs.com/baylor2019/p/12056900.html