title: value does not fall within expected range
body: <p>I'm working on a windows phone project.  I have a listbox with the following selectionchanged event handler:</p>
  
  <pre><code>private void judgeType_SelectionChanged(object sender, SelectionChangedEventArgs e)
  {
      LoadJudgeCategories(judgeTypeListBox.SelectedItem.ToString());
  }
  </code></pre>
  
  <p>Here is the LoadJudgeCategories method:</p>
  
  <pre><code>void LoadJudgeCategories(string judgeType)
  {
      string[] categories = judgeCategories[judgeType];
      List&lt;LabeledTextBox&gt; itemSource = new List&lt;LabeledTextBox&gt;();
      foreach (string cat in categories)
      {
          itemSource.Add(new LabeledTextBox(cat));
      }
      CategoryPanel.ItemsSource = itemSource;
  }
  </code></pre>
  
  <p>judgeCategories is of type</p>
  
  <pre><code>Dictionary&lt;string, string[]&gt;
  </code></pre>
  
  <p>LabeledTextBox is usercontrol with a textblock and a textbox.  CategoryPanel is just a listbox.</p>
  
  <p>Whenever the selected item is changed, I want to clear CategoryPanel, and replace it with a new List.</p>
  
  <p>Occasionally, however, when I change the selection, it gives the exception "value does not fall within the expected range".</p>
  
  <p>How do I fix this?</p>