title: Arranging ListView items Horizontally
body: <p>I am working with a ListView which is grouped on one of the properties (Resource) of Data Source. My requirement is to display each group aligned horizontally with other groups but my implementation (as below) shows the groups aligned veritcally</p>
  
  <pre><code>            &lt;ListView x:Name="listViewResourceHours" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0" SelectionMode="Single" Height="100" Width="300" &gt;
              &lt;ListView.GroupStyle&gt;
                  &lt;GroupStyle&gt;
                      &lt;GroupStyle.ContainerStyle&gt;
                          &lt;Style TargetType="{x:Type GroupItem}"&gt;
                              &lt;Setter Property="Template"&gt;
                                  &lt;Setter.Value&gt;
                                  &lt;ControlTemplate TargetType="GroupItem"&gt;
                                      &lt;StackPanel Orientation="Horizontal"&gt;
                                          &lt;ContentPresenter/&gt;
                                          &lt;ItemsPresenter/&gt;
                                      &lt;/StackPanel&gt;
                                  &lt;/ControlTemplate&gt;
                              &lt;/Setter.Value&gt;
                              &lt;/Setter&gt;
                          &lt;/Style&gt;
                      &lt;/GroupStyle.ContainerStyle&gt;
                  &lt;/GroupStyle&gt;
              &lt;/ListView.GroupStyle&gt;
              &lt;ListView.ItemsPanel&gt;
                  &lt;ItemsPanelTemplate&gt;
                      &lt;StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled" /&gt;
                  &lt;/ItemsPanelTemplate&gt;
              &lt;/ListView.ItemsPanel&gt; 
              &lt;ListView.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" &gt;
                          &lt;Label VerticalAlignment="Center"  Margin="0" Content="{Binding Hours}" /&gt;
                          &lt;Label VerticalAlignment="Center"  Margin="2,0,0,0" Content="{Binding WorkingHoursType, Converter={StaticResource ResourceKey=hoursTypeConverter}}" /&gt;
                      &lt;/StackPanel&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListView.ItemTemplate&gt;
          &lt;/ListView&gt;
  </code></pre>
  
  <p>Here is a sample of what this code results:</p>
  
  <pre><code>PSE: 0 (B) 0 (NB)
  PSC: 0 (B) 0 (NB)
  PM: 0 (B) 0 (NB)
  EIA: 0 (B) 0 (NB)
  </code></pre>
  
  <p>Here is a sample of what I actually want it to look like</p>
  
  <pre><code>PSE: 0 (B) 0 (NB)  PSC: 0 (B) 0 (NB)  PM: 0 (B) 0 (NB)  EIA: 0 (B) 0 (NB)
  </code></pre>
  
  <p>Any help appreciated.</p>