title: WPF Combobox is not updating when collection changed in Model
body: <p>WPF <code>Combobox</code> is not updating when collection changed in <code>Model</code>.</p>
  
  <p>I am using <code>ICollectionView</code> for both DataGrid and ComboBox. DataGrid is updating when collection is changed in model, but <strong><em>ComboBox is not updating</em></strong>. Please let me know if there are any alternate ways to do this.</p>
  
  <p>Here is the code</p>
  
  <p>Model->
  In Model I have</p>
  
  <pre><code>public ObservableCollection&lt;Product&gt; MyModelProducts
  </code></pre>
  
  <p>ViewModel->
  DataGrid Collection</p>
  
  <pre><code>public ICollectionView MyViewModelProducts
  {
    get 
    {   
      return CollectionViewSource.GetDefaultView(MyModel.Instance.MyModelProducts);             
    }
  }
  </code></pre>
  
  <p>ViewModel-ComboBox Collection</p>
  
  <pre><code>public ICollectionView MyViewModelListOfProducts
  {
    get 
    {   
      return CollectionViewSource.GetDefaultView(MyModel.Instance.MyModelProducts.Select(p =&gt; p.Category).Distinct().ToList&lt;string&gt;());            
    }
  }
  </code></pre>
  
  <p>Code in View--></p>
  
  <pre><code>&lt;ComboBox ItemsSource="{Binding MyViewModelListOfProducts, Mode=OneWay}" /&gt;
  </code></pre>
  
  <p>Binding MyViewModelProducts to DataGrid</p>
  
  <p>Binding MyViewModelListOfProducts to a ComboBox.</p>