title: WPF Combobox CompositeCollection bind ComboboxItem Content and list of strings
body: <p>I am using WPF and I have a combobox in my view. My requirement is to display a list of names (ranging from 0 to n elements) and a localizable string "Dummy Name" in the combobox. So I take the ItemsSource of the combobox from two different sources, a list of strings called "names" + a localized string "Dummy Name". This all works well. All elements are displayed as they should. Here is my definition in WPF:</p>
  
  <pre><code>&lt;CollectionViewSource Key="NamesSource" Source="{Binding Context.Data.Names}" /&gt;
  
  &lt;ComboBox HorizontalAlignment="Stretch" VerticalAlignment="Top" SelectedItem="{Binding Person.LastName}"&gt;
    &lt;ComboBox.ItemsSource&gt;
      &lt;CompositeCollection&gt;
        &lt;ComboBoxItem Content="{Static res:Labels.DummyName_Combobox_Selection}"/&gt;
        &lt;CollectionContainer Collection="{Binding Source={StaticResource NamesSource}}" /&gt;
      &lt;/CompositeCollection&gt;
    &lt;/ComboBox.ItemsSource&gt;
  &lt;/ComboBox&gt;
  </code></pre>
  
  <p>The CollectionViewSource is part of a resource dictionary, I just left it out. The problem is with the ComboBoxItem element. </p>
  
  <p>When it is selected in the combobox, it assigns the string "Combobox: Dummy Name" to Person.LastName, instead of "Dummy Name".</p>
  
  <p>Setting SelectedMemberPath attribute to "Content" for the Combobox does not work either (I guess because the strings from Names do not have a Content property).</p>
  
  <p>How can I make it assign "Dummy Name" to Person.LastName when "Dummy Name" is selected in the combobox, instead of "Combobox: Dummy Name"?</p>