title: WPF ItemsControl display only first item
body: <p>I have ItemsControl defined in XAML.</p>
  
  <pre><code>&lt;Grid&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="Auto"&gt;&lt;/RowDefinition&gt;
          &lt;RowDefinition Height="Auto"&gt;&lt;/RowDefinition&gt;
          &lt;RowDefinition Height="*"&gt;&lt;/RowDefinition&gt;
          &lt;RowDefinition Height="*"&gt;&lt;/RowDefinition&gt;
      &lt;/Grid.RowDefinitions&gt;
  
      ...
  
      &lt;StackPanel Orientation="Horizontal" Grid.Row="2" Margin="5" MaxHeight="160"&gt;
  
          &lt;ItemsControl Name="FilterItemsControl" ItemsSource="{Binding Filters}" &gt;
              &lt;ItemsControl.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;GroupBox Header="{Binding Path=Key}" Margin="10,0,0,5" MaxWidth="150"&gt;
                          &lt;ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"&gt;
                              &lt;ItemsControl ItemsSource="{Binding Path=Value}" &gt;
                                  &lt;ItemsControl.ItemTemplate&gt;
                                      &lt;DataTemplate&gt;
                                          &lt;CheckBox  Content="{Binding Path=Name}" IsChecked="{Binding Path=IsChecked}" Margin="1"/&gt;
                                      &lt;/DataTemplate&gt;
                                  &lt;/ItemsControl.ItemTemplate&gt;
                              &lt;/ItemsControl&gt;
                          &lt;/ScrollViewer&gt;
                      &lt;/GroupBox&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ItemsControl.ItemTemplate&gt;
          &lt;/ItemsControl&gt;
  
      &lt;/StackPanel&gt;
  
      ...
  
  &lt;/Grid&gt;
  </code></pre>
  
  <p>ViewModel:</p>
  
  <pre><code>public Dictionary&lt;string, ObservableCollection&lt;CheckableItem&gt;&gt; Filters
      {
          get 
          { 
              return filters; 
          }
          set
          {
              filters = value;
              OnPropertyChanged("Filters");
          }
      }
  </code></pre>
  
  <p>And simple class for CheckableItem:</p>
  
  <pre><code>public class CheckableItem
  {
      private long id;
      private bool isChecked;
      private string name;
  
      public long Id
      {
          get { return id; }
          set { id = value; }
      }
  
      public string Name
      {
          get { return name; }
          set { name = value; }
      }
  
      public bool IsChecked
      {
          get { return isChecked; }
          set { isChecked = value; }
      }
  }
  </code></pre>
  
  <p>Filters dictionary is properly filled in ViewModel. Also Filters.Count is greater than one. 
  I want to display every KeyValuePair from dictionary in horizontal orientation but only first item from the dictionary is shown, why? </p>
  
  <p>Also, is code for horizontal orientation ok?</p>