title: Selected Item of ComboBox is displayed wrong by using of DataTemplate?
body: <p>I have a problem with the ComboBox. The items are displayed when the ComboBox is opened. When I select an item and the ComboBox is closing, the ComboBox displaying <code>Model.Person</code> instead of <code>Name, Vorname</code>.</p>
  
  <ol>
  <li>How can I solve that?<br/></li>
  <li>How can I realize an auto suggestion?<br/></li>
  </ol>
  
  <p>I have a ComboBox with a DataTamplate.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;ComboBox ItemTemplate="{StaticResource PersonenComboboxTemplate}"
   x:Name="Person1CheckboxName" Text="Choose Person" IsEditable="True"
   ItemsSource="{Binding Path=Personenliste}"
   SelectionChanged="Person1CheckboxName_SelectionChanged" /&gt;
  
  &lt;DataTemplate x:Key="PersonenComboboxTemplate"&gt;
      &lt;StackPanel Orientation="Horizontal"&gt;
          &lt;TextBlock Text="{Binding Path=Name}"/&gt;
          &lt;TextBlock Text=", "/&gt;
          &lt;TextBlock Text="{Binding Path=Vorname}"/&gt;
      &lt;/StackPanel&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>I use the MVVM-Pattern. The Data Binding is implemented in the ViewModel.</p>
  
  <pre><code>public ObservableCollection&lt;Person&gt; Personenliste
      {
          get
          {
              ObservableCollection&lt;Person&gt; persColl = 
                                                new ObservableCollection&lt;Person&gt;();
              List&lt;Person&gt; personen = 
                            databaseConnection.getAllPersonsRAW().ToList&lt;Person&gt;();
              // sort by Vorname and Nachname
              personen.Sort(new PersonComparer());
              foreach (Person p in personen)
              {
                  persColl.Add(p);
              }
              return persColl;
          }
      }
  </code></pre>
  
  <p>A <code>Person</code> has a given name (<code>Vorname</code>) and a surname (<code>Name</code>). (generated by ADO.NET Entity Data Model)</p>
  
  <pre><code>[EdmEntityTypeAttribute(NamespaceName="dataModel", Name="Person")]
  [Serializable()]
  [DataContractAttribute(IsReference=true)]
  public partial class Person : EntityObject
  {
      #region Factory-Methode
  
      /// &lt;summary&gt;
      /// Erstellt ein neues Person-Objekt.
      /// &lt;/summary&gt;
      /// &lt;param name="personID"&gt;Anfangswert der Eigenschaft PersonID.&lt;/param&gt;
      public static Person CreatePerson(global::System.Int64 personID)
      {
          Person person = new Person();
          person.PersonID = personID;
          return person;
      }
  
      #endregion
      ...
      [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
      [DataMemberAttribute()]
      public global::System.String Name
      {
          get
          {
              return _Name;
          }
          set
          {
              OnNameChanging(value);
              ReportPropertyChanging("Name");
              _Name = StructuralObject.SetValidValue(value, true);
              ReportPropertyChanged("Name");
              OnNameChanged();
          }
      }
      ...
  }
  </code></pre>