title: Add Image to Grid - WPF
body: <p>I am wondering how I could set an Image to "grid_Main", if I have created all my images in a loop (See Code).</p>
  
  <p>Code:</p>
  
  <pre><code>private void MoleImageMaker()
  {
      NumofImages = TUtils.GetIniInt(Moleini, "NumPictures", "pictures", 8);
      String MoleImageFunction = TUtils.GetIniFileString(Moleini, "ImagePath", "PictureFile", Root + "mole2.png");
  
      for (int i = 0; i &lt; NumofImages; i++)
      {
          Image mole = new Image();
          mole.Source = new BitmapImage(new Uri(MoleImageFunction));
          mole.Name = "Mole" + i;
      }
  }
  </code></pre>