title: Images in custom class not populating imagelist
body: <p>I'm trying to populate a listview through an imagelist using a class that contains a list of another class which holds an image.</p>
  
  <p>Album Class:</p>
  
  <pre><code>public class Camera
  {
      List&lt;Photo&gt; _photos = new List&lt;Photo&gt;();
      string _title = string.Empty;
  
      public List&lt;Photo&gt; Photos
      {
          get
          {
              return this._photos;
          }
          set
          {
              this._photos = value;
          }
      }
  </code></pre>
  
  <p>Photo Class</p>
  
  <pre><code>public class Photo
  {
  
      Image _photo = null;
      String _description = string.Empty;
  
  
      public Image PhotoImage
      {
          get
          {
              return this._photo;
          }
          set
          {
              this._photo = value;
          }
      }
  </code></pre>
  
  <p>Relevant Code</p>
  
  <pre><code>public Form1()
      {
          InitializeComponent();
  
          btnCapture.Enabled = false;
  
          this.listAlbum.View = View.LargeIcon;
          this.imageList1.ImageSize = new Size(64, 48);
          this.listAlbum.LargeImageList = this.imageList1;
  
          foreach (EncoderDevice edv in EncoderDevices.FindDevices(EncoderDeviceType.Video))
          {
              comboCameraSelect.Items.Add(edv.Name);
          }            
      }
  private Image GetScreenShot()
      {
          Image temp = null;
  
          using (Image screenImage = new Bitmap(panelPreview.Width, panelPreview.Height))
          {
              using (Graphics g = Graphics.FromImage(screenImage))
              {                    
                  Rectangle rectanglePanelVideoPreview = panelPreview.Bounds;
                  Point sourcePoints = panelPreview.PointToScreen(new Point(panelPreview.ClientRectangle.X, panelPreview.ClientRectangle.Y));
                  g.CopyFromScreen(sourcePoints, Point.Empty, rectanglePanelVideoPreview.Size);
              }
  
              temp = screenImage;
          }
  
          return temp;
  
      }
  
  public void btnCapture_Click(object sender, EventArgs e)
      {
          Photo p = new Photo();
          p.PhotoImage = GetScreenShot();            
  
          album.Photos.Add(p);
  
          this.imageList1.Images.Add(p.PhotoImage);
  
          ListViewItem item = new ListViewItem();
          item.ImageIndex = j;
          item.ImageKey = j.ToString();
          this.listAlbum.Items.Add(item);
  
          j = (j + 1);
      }
  </code></pre>
  
  <p>When the program gets to- </p>
  
  <pre><code>this.imageList1.Images.Add(p.PhotoImage);
  </code></pre>
  
  <p>it throws an exception saying the parameter is invalid, though it is an image.</p>
  
  <p>The listview appears to gain indexes as a scrollbar appears after a number of cycles, but no thumbs are showing, nor is anything selectable.</p>
  
  <p>Any advice would be greatly appreciated.</p>
  
  <p>Thanks.</p>