title: How can you stop an expander in a list box from collapsing when data changes?
body: <p>I have a screen with a ListBox of items.  The item template contains an expander control with some of the data in the header and some of the data in the content part of the expander.</p>
  
  <p>The data template for the ListBox ItemTemplate is similar to this:</p>
  
  <pre><code>&lt;DataTemplate x:Key="MyTypeTemplate" DataType="{x:Type MyType}"&gt;
    &lt;Expander DataContext="{Binding}"&gt;
      &lt;Expander.Header&gt;
        &lt;Canvas&gt;
          &lt;TextBox Text="{Binding MyProperty}"/&gt;
        &lt;/Canvas&gt;
      &lt;/Expander.Header&gt;
      &lt;Canvas&gt;
        &lt;TextBox Text={Binding MyDetailedProperty}"/&gt;
      &lt;/Canvas&gt;
    &lt;/Expander&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>Whenever these properties change, either 'MyProperty' or 'MyDetailedProperty' changes, the expander control collapsed.  I believe that is has something to do with the Expander item getting recreated when the data changes.</p>
  
  <p>As an additional data item, the list being bound to the listbox implements IBindingList as it comes from a library created for .NET 2.0.  I cannot recreate the list using ObservableCollection due to time constraints</p>