title: WPF ComboBox Binding
body: <p>So I have the following model:</p>
  
  <pre><code>public class Person
  {
    public String FirstName { get; set; }
    public String LastName { get; set; } 
    public String Address { get; set; }
    public String EMail { get; set; }
    public String Phone { get; set; } 
  }
  
  public class Order
  {
     public Person Pers { get; set;}
     public Product Prod { get; set; }
     public List&lt;Person&gt; AllPersons { get; set; } 
  
     public Order(Person person, Product prod )
     {
       this.Pers = person;
       this.Prod = prod;
       AllPersons = database.Persons.GetAll(); 
     }
  
  }
  </code></pre>
  
  <p>And I have a WPF window used to edit an order. 
  I set the DataContext to Order.</p>
  
  <pre><code>public SetDisplay(Order ord)
  {
   DataContext = ord; 
  }
  </code></pre>
  
  <p>I have the following XAML: </p>
  
  <pre><code>&lt;ComboBox Name="myComboBox"
            SelectedItem = "{Binding Path=Pers, Mode=TwoWay}"
            ItemsSource = "{Binding Path=AllPersons, Mode=OneWay}"
            DisplayMemberPath = "FirstName"
            IsEditable="False" /&gt;
  
  
  &lt;Label Name="lblPersonName" Content = "{Binding Path=Pers.FirstName}" /&gt;
  &lt;Label Name="lblPersonLastName" Content = "{Binding Path=Pers.LastName}" /&gt;
  &lt;Label Name="lblPersonEMail" Content = "{Binding Path=Pers.EMail}" /&gt;
  &lt;Label Name="lblPersonAddress" Content = "{Binding Path=Pers.Address}" /&gt;
  </code></pre>
  
  <p>However, the binding does not seem to work.......When I change the selected item , the labels do not update ....</p>
  
  <p>Regards!!</p>
  
  <p>Any reply is appreciated !! </p>