title: WPF List inside List Binding
body: <p>I am using nested ListBox for databinding,
  This is my ListBox</p>
  
  <pre><code>&lt;ListBox x:Name="lst1" ItemsSource="{Binding ListDS}" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Disabled" &gt;
      &lt;ListBox.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;StackPanel Orientation="Vertical" Margin="10"&gt;
                  &lt;TextBlock Text="{Binding Name}"/&gt;
                  &lt;ListBox Height="300" Width="200" ItemsSource="{Binding userFiles }" Margin="0,10" &gt;
                      &lt;ListBox.ItemTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;StackPanel Margin="0,10,0,0"&gt;
                                  &lt;TextBlock Text="{Binding Name}"/&gt;
                              &lt;/StackPanel&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/ListBox.ItemTemplate&gt;
                  &lt;/ListBox&gt;
                  &lt;Button Content="Print" Width="75" HorizontalAlignment="Right" /&gt;
              &lt;/StackPanel&gt;
          &lt;/DataTemplate&gt;
      &lt;/ListBox.ItemTemplate&gt;
      &lt;ListBox.ItemsPanel&gt;
          &lt;ItemsPanelTemplate&gt;
              &lt;StackPanel Margin="0,0,0,0" Orientation="Horizontal"/&gt;
          &lt;/ItemsPanelTemplate&gt;
      &lt;/ListBox.ItemsPanel&gt;
  &lt;/ListBox&gt;
  </code></pre>
  
  <p>These are my entities </p>
  
  <pre><code>public class UsersInfo
  {
      public long Id { get; set; }
      public string Name { get; set; }
      public DateTime DateCreated { get; set; }
      public DateTime DateUploaded { get; set; }
      public List&lt;UsersFiles&gt; userFiles { get; set; }
  }
  public class UsersFiles
  {
      public long Id { get; set; }
      public string Name { get; set; }
      public DateTime DateCreated { get; set; }
      public DateTime DateDownloaded { get; set; }
  }
  </code></pre>
  
  <p>and in my ViewModel, I have this</p>
  
  <pre><code>public List&lt;UsersInfo&gt; ListDS{ get; set; }
  </code></pre>
  
  <p>I am initializing it in my ViewModel's constructor and this is how I am populating the data</p>
  
  <pre><code>UsersInfo entity = new UsersInfo();
  entity.MediaFiles = new List&lt;UsersFiles&gt;();
  UsersFiles mFiles = new UsersFiles();                           
  mFiles.Name = "abc";
  mFiles.Id = 1
  entity.Name = "User name";
  entity.MediaFiles.Add(mFiles);
  ListDS.Add(entity);
  </code></pre>
  
  <p>The problem is, ListBox is appearing blank, nothing is showing on it,even Print button.
  When I added ListBoxItem in it,its showing perfectly.
  Where I am doing wrong in databinding?</p>