title: Windows Store dynamically add items into GridView
body: <p>Hee,</p>
  
  <p>I'm currently trying to make a GridView which contains items within an Image and a textblock for a title. I want to add these dynamically.</p>
  
  <p>After searching for an hour I got this:</p>
  
  <pre><code>&lt;GridView 
      x:Name="grid" 
      SelectionMode="Single" 
      IsItemClickEnabled="False"  
      Foreground="#DEFFFFFF" 
      SelectionChanged="GridView_SelectionChanged" Margin="0, 50, 0, 0" &gt;
      &lt;GridView.Resources&gt;
          &lt;CollectionViewSource x:Name="CollectionViewSource" x:Key="CollectionViewSource" /&gt;
          &lt;DataTemplate x:Key="ImageBinder"&gt;
              &lt;Image Source="{Binding Photo}" Width="200" Height="200" /&gt;
          &lt;/DataTemplate&gt;
          &lt;DataTemplate x:Key="TextBinder"&gt;
              &lt;TextBlock Text="{Binding Text}" Width="auto" Height ="auto" /&gt;
          &lt;/DataTemplate&gt;
      &lt;/GridView.Resources&gt;
  
  &lt;/GridView&gt;
  </code></pre>
  
  <p>I understand from reading that the Source attributes needs a class or something?  But I really don't understand how I can add Item dynamically to the grid this way, can someone explain that to me with a code example?</p>