title: Silverlight - Binding child ItemsControl source to a property in a parent ItemsControl source
body: <p>I've got an ItemsControl that has another ItemsControl in it.
  which means, for each item in the parent list, i want to show all the items in the child list.</p>
  
  <p>so the Xaml is something like this (I'm neglecting some of the DataTemplate)"</p>
  
  <pre><code>&lt;ItemsControl x:Name="dayPanel" Grid.Column="1"&gt;
         &lt;ItemsControl.ItemTemplate&gt;
             &lt;DataTemplate&gt;
                   &lt;Grid&gt;
                       &lt;ItemsControl x:Name="dayHours" Grid.Row="1" ItemsSource={Binding HourItems}"&gt;
                           &lt;ItemsControl.ItemTemplate&gt;
                                &lt;DataTemplate&gt;
                                &lt;/DataTemplate&gt;
                           &lt;/ItemsControl.ItemTemplate&gt;
                       &lt;/ItemsControl&gt;
                   &lt;/Grid&gt;
             &lt;/DataTemplate&gt;
         &lt;/ItemsControl.ItemTemplate&gt;
  &lt;/ItemsControl&gt;
  </code></pre>
  
  <p>Now in the Code behind i Make a Class that creates a list of days, and each day contains a list of hours.
  so i get something like this:</p>
  
  <pre><code>public WeekPanel()
      {
          InitializeComponent();
  
          dayPanel.ItemsSource = new Dayx().CreateDays();
      }
  </code></pre>
  
  <p>So.. the first part, that i define in code, works fine.
  but the child ItemsControl doesn't get populated.
  I want to bind it to the property: HourItems
  how do i do that?</p>
  
  <p><strong>Edit:</strong>
  Okay, the problem was that HourItems property was defined as:</p>
  
  <pre><code>Public List&lt;Hour&gt; HourItem {get; set;}
  </code></pre>
  
  <p>but it worked when i changed it to:</p>
  
  <pre><code>public List&lt;Hour&gt; HourItems
          {
              get { return hourItems; }
              set { hourItems = value; }
          }
  </code></pre>
  
  <p>what's the difference that made it work?</p>