title: How can I get multibinding to work in XAML ListBox?
body: <p>The following shows me 3x "MultiTest.Model.Customers" in the ListBox (one for each record it should display).</p>
  
  <p>What do I need to change in order for it to output the <em>contents</em> of the fields instead?</p>
  
  <pre><code>&lt;Window.Resources&gt;
      &lt;Style TargetType="{x:Type ListBoxItem}"&gt;
          &lt;Setter Property="ContentTemplate" &gt;
              &lt;Setter.Value&gt;
                  &lt;MultiBinding StringFormat="{}{1}, {0} "&gt;
                      &lt;Binding Path="FirstName" /&gt;
                      &lt;Binding Path="LastName"/&gt;
                  &lt;/MultiBinding&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  &lt;/Window.Resources&gt;
  &lt;Grid&gt;
      &lt;ListBox x:Name="theCustomers"/&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>binding in code-behind with ADO.NET Entity Framework:</p>
  
  <pre><code>MainEntities db = new MainEntities();
  var customers = from c in db.CustomersSet
                  select c;
  theCustomers.ItemsSource = customers;
  </code></pre>
  
  <h2>ANSWER:</h2>
  
  <p>Thanks, Steve, here is your answer in my Window.Resources format:</p>
  
  <pre><code>&lt;Window.Resources&gt;
      &lt;Style TargetType="{x:Type ListBoxItem}"&gt;
          &lt;Setter Property="ContentTemplate" &gt;
              &lt;Setter.Value&gt;
                  &lt;DataTemplate&gt;
                      &lt;StackPanel Orientation="Horizontal"&gt;
                          &lt;TextBlock&gt;
                              &lt;TextBlock.Text&gt;
                                  &lt;MultiBinding  StringFormat="{}{1}, {0} ({2})"&gt;
                                      &lt;Binding Path="FirstName"/&gt;
                                      &lt;Binding Path="LastName"/&gt;
                                      &lt;Binding Path="ID"/&gt;
                                  &lt;/MultiBinding&gt;
                              &lt;/TextBlock.Text&gt;
                          &lt;/TextBlock&gt;
                      &lt;/StackPanel&gt;
                  &lt;/DataTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  &lt;/Window.Resources&gt;
  &lt;Grid&gt;
      &lt;ListBox x:Name="theCustomers"/&gt;
  &lt;/Grid&gt;
  </code></pre>