title: How to nest ItemsControl with multiple ItemsSource?
body: <p>I have a <code>ConfigList</code> object with a name and a <code>Dictionary</code> and I need to nest <code>ItemsControls</code> with different <code>ItemsSource</code>.</p>
  <p>I tried to do it this way :</p>
  <pre><code>&lt;ItemsControl x:Name=&quot;TestStep&quot; Grid.Row=&quot;0&quot; Grid.Column=&quot;0&quot; ItemsSource=&quot;{Binding Path=ConfigList }&quot; HorizontalAlignment=&quot;Center&quot; VerticalAlignment=&quot;Center&quot;&gt;
      &lt;ItemsControl.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;TextBlock Text=&quot;{Binding Path=Ictrl.Nom}&quot; /&gt;
          &lt;/DataTemplate&gt;
      &lt;/ItemsControl.ItemTemplate&gt;
      &lt;ItemsControl
      ItemsSource=&quot;{Binding Path=Param}&quot;&gt;
          &lt;ItemsControl.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;StackPanel Orientation=&quot;Horizontal&quot;&gt;
                      &lt;TextBlock Text=&quot;{Binding Path=Key}&quot; /&gt;
                      &lt;TextBlock Text=&quot; : &quot; /&gt;
                      &lt;TextBlock Text=&quot;{Binding Path=Value}&quot; /&gt;
                  &lt;/StackPanel&gt;
              &lt;/DataTemplate&gt;
          &lt;/ItemsControl.ItemTemplate&gt;
      &lt;/ItemsControl&gt;
  &lt;/ItemsControl&gt;
  </code></pre>
  <p>When I start my application, I've got this error :</p>
  <blockquote>
  <p>System.Windows.Markup.XamlParseException : '' Adding a value to the
  collection of type 'System.Windows.Controls.ItemCollection' threw an
  exception. ' line number '25' and line position '14'. '</p>
  </blockquote>
  <blockquote>
  <p>Internal Exception
  InvalidOperationException: Invalid operation when ItemsSource is in
  use. Access and edit items with ItemsControl.ItemsSource.</p>
  </blockquote>
  <p>Any idea what ​​the problem is?</p>