title: Orientation of StackPanel is not Working in ItemsControl (WPF)
body: <p>My WPF Application is generating dynamic Buttons. I want to show these Button Horizontally. I wrote Code for this. Code is working fine but rather than showing button in Horizontal Direction, it is showing all Buttons in Vertical Direction! Where i also set <code>Orientation</code> of StackPanel!</p>
  
  <p>Can anyone solve my Problem?</p>
  
  <p>My Code is:</p>
  
  <pre><code>  &lt;Grid&gt;
      &lt;dxlc:ScrollBox&gt;
          &lt;ItemsControl x:Name="Buttonslist"&gt;
              &lt;ItemsControl.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;StackPanel Orientation="Horizontal"&gt;
                          &lt;Button Content="{Binding Text}" Tag="{Binding Text}" x:Name="New" Margin="5,0,5,0" Click="New_Click"  /&gt;
      &lt;/StackPanel&gt;
      &lt;/DataTemplate&gt;
      &lt;/ItemsControl.ItemTemplate&gt;
      &lt;/ItemsControl&gt;
  
      &lt;/dxlc:ScrollBox&gt;
      &lt;/Grid&gt;
  </code></pre>