title: Trouble binding ObservableCollection to DataTemplate
body: <p>I'm trying to build a simple app to display the results of an API call. I can't seem to figure out how to bind my results to my data template.</p>
  
  <p>The behavior i am looking for in this TestApp is that when the button is pushed the listview displays the name, party, and state of each Representative.</p>
  
  <pre><code>namespace TestApp
  {        
      public class Reps
      {
          public Rep[] results { get; set; }
      }
  
      public class Rep
      {
          public string name { get; set; }
          public string party { get; set; }
          public string state { get; set; }
          public string district { get; set; }
          public string phone { get; set; }
          public string office { get; set; }
          public string link { get; set; }
  
          public Rep() { }
  
          public Rep(string name, string party, string state)
          {
              this.name = name;
              this.party = party;
              this.state = state;
          }
      }      
  }
  
  namespace TestApp
  {    
      public sealed partial class MainPage : Page
      {
          public ObservableCollection&lt;Rep&gt; Representative = new ObservableCollection&lt;Rep&gt;();
  
          public MainPage()
          {
              this.InitializeComponent();            
          }
  
          protected override void OnNavigatedTo(NavigationEventArgs e)
          {
              listView1.DataContext = Representative;
          }
  
          private async void Button_Click(object sender, RoutedEventArgs e)
          {            
              var uri = new Uri("http://whoismyrepresentative.com/getall_mems.php?zip=31023&amp;output=json");
              var request = WebRequest.CreateHttp(uri);
              request.Method = "GET";
              request.Accept = "application/json";
              var response = await request.GetResponseAsync();
              var stream = response.GetResponseStream();
  
              var deserializer = new DataContractJsonSerializer(typeof(Reps));
  
              Reps rps = (Reps)deserializer.ReadObject(stream);
  
              for (int i = 0; i &lt; rps.results.Length; i++)
              {             
                  Rep newRep = new Rep { name = rps.results[i].name.ToString(), 
                                         party = rps.results[i].party.ToString(), 
                                         state = rps.results[i].state.ToString() };
                  Representative.Add(newRep);
  
                  Debug.WriteLine(rps.results[i].name.ToString());
              }                      
          }
      }
  }
  
  &lt;Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}"&gt;
      &lt;Button Content="Button" 
              HorizontalAlignment="Left" 
              Margin="275,212,0,0" 
              VerticalAlignment="Top" 
              Click="Button_Click" /&gt;
          &lt;Grid HorizontalAlignment="Left" 
                Height="293" 
                Margin="524,133,0,0" 
                VerticalAlignment="Top" 
                Width="399"&gt;             
              &lt;ListView x:Name="listView1" ItemsSource="{Binding Representative}"&gt;
                  &lt;ListView.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;StackPanel&gt;
                          &lt;TextBlock Text="{Binding name}"
                                 FontSize="20"
                                 Foreground="White"/&gt;
                              &lt;TextBlock Text="{Binding party}"
                                         FontSize="20"
                                         Foreground="White"/&gt;
                              &lt;TextBlock Text="{Binding state}"
                                         FontSize="20"
                                         Foreground="White"/&gt;
                      &lt;/StackPanel&gt;
                  &lt;/DataTemplate&gt;
                  &lt;/ListView.ItemTemplate&gt;
              &lt;/ListView&gt;
          &lt;/Grid&gt;
  </code></pre>