title: How to refresh listbox in the windows Phone
body: <p>I have a <code>listbox tuningList</code> containing elements of the <code>List&lt;Tuning&gt; tunings</code>:</p>
  
  <pre><code>  private void LoadList() {
              foreach (Tuning tuning in tunings)
                  tuningList.Items.Add(tuning);
          }
  </code></pre>
  
  <p>At certain point in the app I want to delete some elements in the <code>tunings</code> and update the <code>listbox</code></p>
  
  <pre><code> int selectionIndex = tuningList.SelectedIndex;
              if (selectionIndex &gt;= 0) {
                  pageTitle.Text = "Deleted tuning";
                  tunings.RemoveAt(selectionIndex);
                 // tuningList.Items.RemoveAt(selectionIndex);
                  saveData(saver); //saves data to isolated storage 
  
              } 
  </code></pre>
  
  <p>but after that listbox does not update itself.</p>
  
  <p>EDIT: I did not bind the listbox to the collection via XAML, I added the elements by the LoadList();</p>
  
  <pre><code>&lt;ListBox x:Name="tuningList" Margin="8,0,8,152" Tap="tuningList_Tap"/&gt;
  </code></pre>
  
  <p>EDIT2:</p>
  
  <pre><code>&lt;ListBox x:Name="tuningList" Margin="8,0,8,152" ItemsSource=tunings.Items Tap="tuningList_Tap"/&gt;
  </code></pre>
  
  <p>EDIT3: </p>
  
  <pre><code>&lt;ListBox  x:Name="tuningList" Margin="8,0,8,152"  DataContext="{Binding RelativeSource={RelativeSource Self}}" ItemsSource="{Binding tunings}" Tap="tuningList_Tap"/&gt;   
  </code></pre>