title: Using StackPanel as ContentControl (WPF)
body: <p>So I have a StackPanel that I am using as a ContentControl.  I have a place where I want buttons to be generated based on data that I am binding to, and that is all working good, but I want the buttons to be laid out horizontally, not vertically as is what is currently happening.  Here's a screenshot:</p>
  
  <p><img src="https://img.photobucket.com/albums/v428/acousticshredder/releaseButtons.jpg" alt="alt text"></p>
  
  <p>And here is the code from my ContentTemplate description:</p>
  
  <pre><code>&lt;StackPanel Name="wpReleaseButtons" Orientation="Horizontal" Grid.Row="2"&gt;
      &lt;ItemsControl IsTabStop="False" ItemsSource="{Binding Path=BranchCommands}"&gt;
          &lt;ItemsControl.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;Button Tag="{Binding}" Padding="3"&gt;
                       &lt;TextBlock Text="{Binding Path=DisplayValue}" /&gt;
                  &lt;/Button&gt;
              &lt;/DataTemplate&gt;
          &lt;/ItemsControl.ItemTemplate&gt;
      &lt;/ItemsControl&gt;
  &lt;/StackPanel&gt;
  </code></pre>
  
  <p>Not sure what I'm doing wrong here.  Any info would be greatly appreciated.  Thanks!</p>