title: How can I change a Listbox's' DataTemplate orientation at runtime?
body: <p>I am recently trying to learn WinRT and Xaml, and I stumbled upong this issue:</p>
  
  <p>I have this fragment of code:</p>
  
  <pre><code>&lt;ListBox Grid.Row="1" x:Name="imageListBox" Height="721"&gt;
          &lt;ListBox.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;StackPanel x:Name="imageListBoxStackPanelTemplate" HorizontalAlignment="Center"&gt;
                      &lt;Image Source="{Binding url}"/&gt;
                  &lt;/StackPanel&gt;
              &lt;/DataTemplate&gt;
          &lt;/ListBox.ItemTemplate&gt;
      &lt;/ListBox&gt;
  </code></pre>
  
  <p>which is bound to an ObservableCollection, and displays the images vertically.
  I'd like to be able to change the orientation (the flow direction) of the images from Vertical to Horizontal upong pressing a Button, at runtime.</p>
  
  <p>I've tried several solutions without any luck, so I hope someone of you could lend me an hand. Thanks! :)</p>