<Window x:Class="ItemsPanelSample.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    Title="ItemsPanelSample" Height="300" Width="300">
  <Window.Resources>
    <x:ArrayExtension Type="{x:Type sys:String}"  x:Key="items">
      <sys:String>one for the money,</sys:String>
      <sys:String>two for show,</sys:String>
      <sys:String>three to get ready,</sys:String>
      <sys:String>four to go!</sys:String>
    </x:ArrayExtension>
  </Window.Resources>
  <StackPanel DataContext="{StaticResource items}">
    <ListBox ItemsSource="{Binding}" ScrollViewer.VerticalScrollBarVisibility="Disabled">
      <ListBox.ItemsPanel>
        <ItemsPanelTemplate>
          <StackPanel Orientation="Horizontal" />
        </ItemsPanelTemplate>
      </ListBox.ItemsPanel>
    </ListBox>
    <ComboBox ItemsSource="{Binding}">
      <ComboBox.ItemsPanel>
        <ItemsPanelTemplate>
          <UniformGrid />
        </ItemsPanelTemplate>
      </ComboBox.ItemsPanel>
    </ComboBox>
  </StackPanel>
</Window>
