title: WPF ListBox with multiple sources of different types
body: <p>I was actually setting up a sample application for something entirely different, but then I was trying this:</p>
  
  <p>I have a collection of <code>Movies</code>. I'll have a list box which displays all the movies. The list box, however, provides them as buttons, so that you can click onto a button and play the movie.</p>
  
  <p>The code is:</p>
  
  <pre><code>&lt;StackPanel DockPanel.Dock="Top"&gt;
      &lt;ListBox ItemsSource="{Binding Movies}" SelectedItem="{Binding Path=SelectedMovie}"&gt;
          &lt;ListBox.ItemsPanel&gt;
              &lt;ItemsPanelTemplate&gt;
                  &lt;WrapPanel IsItemsHost="True"
                             Width="{Binding (FrameworkElement.ActualWidth),
                                     RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"/&gt;
              &lt;/ItemsPanelTemplate&gt;
          &lt;/ListBox.ItemsPanel&gt;
          &lt;ListBox.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;Button Content="{Binding Title}"
                          Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}},
                                    Path=DataContext.PlayMovieCommand}"
                          CommandParameter="{Binding Id}" /&gt;
              &lt;/DataTemplate&gt;
          &lt;/ListBox.ItemTemplate&gt;
      &lt;/ListBox&gt;
  &lt;/StackPanel&gt;
  </code></pre>
  
  <p>Then I was thinking of adding a single Button to the end, with the text "Add", and when I click onto that button, I can add a new movie.</p>
  
  <p>I don't find a solution to provide this. While searching the Internet I found  <code>HierarchicalDataTemplate</code> and <code>CompositeCollection</code>; both looking promising at first, but I failed to get it working as I want. I was thinking of <code>MultiBinding</code>, too, but again I seem to fail.</p>
  
  <p>So, I guess my question is:<br>
  How can I add a single Add-button to my collection of movies?</p>
  
  <p>Or more generic:
  How can I add several sources/collections of data of different types to a list box?</p>