title: Panorama Binding on WP7, Items collection must be empty before using ItemsSource
body: <p>i keep getting this error: Items collection must be empty before using ItemsSource, when i attempt to bind data to a Panorama control. below is my xaml snippet.</p>
  
  <pre><code>&lt;controls:Panorama x:Name="panorama"&gt;
   &lt;controls:PanoramaItem &gt;
    &lt;StackPanel&gt;
     &lt;TextBlock Text="{Binding Text}"/&gt;
    &lt;/StackPanel&gt;
   &lt;/controls:PanoramaItem&gt;
  &lt;/controls:Panorama&gt;
  </code></pre>
  
  <p>in my code behind (xaml.cs), i do something like this:</p>
  
  <pre><code>protected override void OnNavigatedTo(NavigationEventArgs e) {
   string id = NavigationContext.QueryString["id"];
   ObservableCollection&lt;MyObject&gt; list = DataAccessService.get(id);
   panorama.ItemsSource = list;
   base.OnNavigatedTo(e);
  }
  </code></pre>
  
  <p>note that MyObject has a Text property. any help is appreciated.</p>
  
  <p>after modifying it per the link below, the same exception is still thrown.</p>
  
  <pre><code>&lt;controls:Panorama x:Name="panorama"&gt;
   &lt;controls:Panorama.HeaderTemplate&gt;
    &lt;DataTemplate&gt;
     &lt;TextBlock Text="{Binding Header}"/&gt;
    &lt;/DataTemplate&gt;
   &lt;/controls:Panorama.HeaderTemplate&gt;
   &lt;controls:PanoramaItem &gt;
    &lt;DataTemplate&gt;
     &lt;StackPanel&gt;
      &lt;TextBlock Text="{Binding Text}"/&gt;
     &lt;/StackPanel&gt;
    &lt;/DataTemplate&gt;
   &lt;/controls:PanoramaItem&gt;
  &lt;/controls:Panorama&gt;
  </code></pre>
  
  <p>finally, after continuing further with the user below's help, this is the solution that got rid of the exception.</p>
  
  <pre><code>&lt;controls:Panorama x:Name="panorama"&gt;
   &lt;controls:Panorama.HeaderTemplate&gt;
    &lt;DataTemplate&gt;
     &lt;TextBlock Text="{Binding Header}"/&gt;
    &lt;/DataTemplate&gt;
   &lt;/controls:Panorama.HeaderTemplate&gt;
   &lt;controls:Panorama.ItemTemplate&gt;
    &lt;DataTemplate&gt;
     &lt;StackPanel&gt;
      &lt;TextBlock Text="{Binding Text}"/&gt;
     &lt;/StackPanel&gt;
    &lt;/DataTemplate&gt;
   &lt;/controls:Panorama.ItemTemplate&gt;
  &lt;/controls:Panorama&gt;
  </code></pre>