title: Stackpanel/Itemscontrol Databinding
body: <p>I have this XAML:</p>
  
  <pre><code> &lt;ItemsControl x:Name="recentSearches"
                 Margin="0,65,0,0"&gt;
                 &lt;ItemsControl.ItemsPanel&gt;
                     &lt;ItemsPanelTemplate&gt;
                           &lt;StackPanel Orientation="Horizontal" /&gt;
                      &lt;/ItemsPanelTemplate&gt;
                  &lt;/ItemsControl.ItemsPanel&gt;
                  &lt;ItemsControl.ItemTemplate&gt;
                      &lt;DataTemplate&gt;
                           &lt;TextBlock Text="{Binding q}"
                                  TextWrapping="Wrap"
                                  Foreground="AliceBlue"
                                  Padding="2,6,2,2"
                                  Margin="12,-6,12,0"
                                  FontSize="20" /&gt;
                        &lt;/DataTemplate&gt;
                   &lt;/ItemsControl.ItemTemplate&gt;
  </code></pre>
  
  <p>and this code behind:</p>
  
  <pre><code>private void showLatestSearches()
          {
              if (fmn.checkLatestSearchesExtistence())
              {
                  List&lt;RecentSearchItem&gt; recent = new List&lt;RecentSearchItem&gt;();
                  List&lt;String&gt; l = fmn.readLatestSearches();
                  for (int i = 0; i &lt;= l.Count-1; i += 1)
                  {
                      RecentSearchItem r = new RecentSearchItem();
                      r.q = l[i];
                      r.generalbg = grau;
                      recent.Add(r);
                  }
                  recentSearches.DataContext = recent;
              }
          }
  </code></pre>
  
  <p>the object called fmn reads a .txt from the isolated storage. 
  But why doesn't anything show up with this StackPanel?</p>