title: Populating ComboBox With Object Property Using ObjectDataProvider
body: <p>I have an <em>ObjectDataProvider</em> defined as follows:</p>
  
  <pre><code>&lt;ObjectDataProvider x:Key="employeeDataProvider" ObjectType="{x:Type cbb2:EmployeeAccess}" MethodName="getEmployees"&gt;            
  &lt;/ObjectDataProvider&gt;
  </code></pre>
  
  <p>As you can see the method <em>getEmployees</em> is called which returns a list of type <em>Employee</em>. The Employee class is defined as follows:</p>
  
  <pre><code>class Employee
  {
      public string name { get; set; }
      public int id { get; set; }
  }
  </code></pre>
  
  <p>My XAML page has a combo box that I want to populate with the employee name. Here is what I have so far:</p>
  
  <pre><code>&lt;ComboBox ... ItemsSource="{Binding Source={StaticResource employeeDataProvider}}"/&gt;
  </code></pre>
  
  <p>The problem I am having is the combo box is being populated with the Employee object and not the name property of the Employee.</p>
  
  <p>Here is a picture of what's happening:</p>
  
  <p><img src="https://i.stack.imgur.com/lQv2o.png" alt="combo box"></p>
  
  <p>My question is, how to I get the combo box to populate with just the name property of the employee?</p>
  
  <p>Thanks!</p>