title: WPF Filter a ListBox
body: <p>I have a <code>ListBox</code> with binding to a list of strings. I want to filter the list when I enter text in a <code>TextBox</code>. How can I do it?</p>
  
  <pre><code>public void ListLoad()
  {
      ElementList = new List&lt;string&gt;(); // creation a list of strings
      ElementList.Add("1"); // add a item of string
      ElementList.Add("2"); // add a item of string
  
      DataContext = this; // set the data context
  }
  </code></pre>
  
  <p>I'm binding it in XAML with: </p>
  
  <pre><code>ItemsSource="{Binding ElementList}"
  </code></pre>