title: WPF combo box binding to generic list
body: <p>I have a method which returns a generic list (from the db it returns a set of data to a list). I want to bind one property of that list to a <code>ComboBox</code> using <code>ComboBox</code>'s  <code>ItemsSource="{Binding Path=ListFirstName}"</code> property.  How can I achive this? The code I tried:</p>
  
  <p>XAML code:</p>
  
  <pre><code>&lt;ComboBox Name="cmbName"
           ItemsSource="{Binding Path=ExamineeList}"
           DisplayMemberPath="FirstName" /&gt;
  </code></pre>
  
  <p>XAML.cs code:</p>
  
  <pre><code>Examinee oExaminee = new Examinee();
  List&lt;Examinee&gt; ExamineeList;
  ExamineeList = oExaminee.ListAll(); //ListAll method returns a generic list 
  cmbName.DataContext = ExamineeList;
  </code></pre>