title: Inserting Images to a Grid in Code Behind
body: <p>I found lots of tutorials on how to add things to a grid manually in the XAML file, but the grid I am making is a 15x15 monster that needs to have over 100 images inserted into it.  I was hoping there was some accessor that would allow me to add an image to it in the code-behind file using a loop.  </p>
  
  <pre><code>&lt;Grid Name="ScrabbleBoard"&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition /&gt;
          &lt;ColumnDefinition /&gt;
          &lt;ColumnDefinition /&gt;
          &lt;ColumnDefinition /&gt;
          &lt;ColumnDefinition /&gt;
          &lt;ColumnDefinition /&gt;
          &lt;ColumnDefinition /&gt;
          &lt;ColumnDefinition /&gt;
          &lt;ColumnDefinition /&gt;
          &lt;ColumnDefinition /&gt;
          &lt;ColumnDefinition /&gt;
          &lt;ColumnDefinition /&gt;
          &lt;ColumnDefinition /&gt;
          &lt;ColumnDefinition /&gt;
          &lt;ColumnDefinition /&gt;
      &lt;/Grid.ColumnDefinitions&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition /&gt;
          &lt;RowDefinition /&gt;
          &lt;RowDefinition /&gt;
          &lt;RowDefinition /&gt;
          &lt;RowDefinition /&gt;
          &lt;RowDefinition /&gt;
          &lt;RowDefinition /&gt;
          &lt;RowDefinition /&gt;
          &lt;RowDefinition /&gt;
          &lt;RowDefinition /&gt;
          &lt;RowDefinition /&gt;
          &lt;RowDefinition /&gt;
          &lt;RowDefinition /&gt;
          &lt;RowDefinition /&gt;
          &lt;RowDefinition /&gt;
      &lt;/Grid.RowDefinitions&gt;
  &lt;/Grid&gt;
  </code></pre>