private void Form1_Load(object sender, EventArgs e) { Height = 500; Width = 500; MyPanel myPanel = new MyPanel(); myPanel.BackColor = Color.White; myPanel.BorderStyle = BorderStyle.FixedSingle; myPanel.Height = Height - 50; myPanel.Width = 200; myPanel.Top = 5; myPanel.Left = 5; Controls.Add(myPanel); var icon1 = Image.FromFile(@"path/to/file"); //Load the image FIRST MyPanel.Tile tile = new MyPanel.Tile(icon1); //Pass it into the constructor tile.BackColor = Color.PowderBlue; myPanel.AddTile(tile); var icon2 = Image.FromFile(@"path/to/file"); //Again, image first MyPanel.Tile tile2 = new MyPanel.Tile(icon2); //Then construct tile2.BackColor = Color.PeachPuff; myPanel.AddTile(tile2); }