title: How to reload the ICollectionView binding to wpf combobox?
body: <p>I have one textBox and one combobox in wpf usercontrol. ComboxBox is binded to ICollectionView (CurencyList) which populates Currency Pairs like GBP/EUR,CLP/EUR,USD/EUR,EUR/USD etc. Whenever the user writes in textbox e.g. EUR the combobox should get filtered and display the dropdownlist with EUR as the second currency. </p>
  
  <p><img src="https://i.stack.imgur.com/FOKyk.jpg" alt="enter image description here"></p>
  
  <p>For this I have used like:</p>
  
  <pre><code> public string Currency
      {
          get { 
  
              return _criteriaType.currency; }
          set
          {
              if (_criteriaType.currency != value)
              {
                  _criteriaType.currency = value.EmptyOrWhiteSpaceAsNull();
                  base.OnPropertyChanged("Currency");
                  CurrencyList.Filter = new Predicate&lt;object&gt;(Contains);
  
              }
          }
      }
  
  
  
  public bool Contains(object de)
      {
          CurrencyPair o = de as CurrencyPair;
          if (Currency != null || Currency == string.Empty)
          {
             return (o.name.Substring(3, 4).ToLower().Contains(Currency.ToLower()));              
          }
          else
          {
              IsOpen = false;
              OnPropertyChanged("IsOpen");               
              return false;
          }
      }
  </code></pre>
  
  <p>CurrencyList is coming from a webservice:</p>
  
  <pre><code> private ICollectionView GetCurrencyPair()
      {
  
          strCurrencyPair.arg0 = (Currency != string.Empty &amp;&amp; Currency != null) ? Convert.ToString(Currency).ToUpper() : string.Empty;
          string[][] cPair = ServiceLocator.Resolve&lt;IWebServiceRepository&gt;().BusinessWebService.getCurrenyPairs(strCurrencyPair);
  
          foreach (string[] item in cPair)
          {
              IList.Add(new CurrencyPair() { name = (Convert.ToString(item[0]).ToUpper() + "/" + Convert.ToString(item[1]).ToUpper()) });
  
          }
        return  CurrencyList =CollectionViewSource.GetDefaultView(IList);
  
      }
  </code></pre>
  
  <p>Filtering is working fine. But when the user deletes the currency from textbox with backward arrow key from keyboard, the combobox filtered to nothing i.e. dropdownlist is empty. 
  How to overcome this problem. kindly suggest?</p>