title: Itemscontrol within Itemscontrol and binding them with custom data
body: <p>I am very new in WPF. I have been trying to do the following:</p>
  
  <p>Following is the structure of my data:</p>
  
  <pre><code>public class TokenItems {public string items {get;set;} public int quantity {get;set}}
  public class Token { public int tokenNo {get;set;} public string name {get;set;} public   List&lt;TokenItems&gt; currentItems {get;set;}}
  public List&lt;Token&gt; tokenList = new List&lt;Token&gt;();
  </code></pre>
  
  <p>XAML:</p>
  
  <pre><code>&lt;ItemsControl Name="ParentControl"&gt;
     ....
     &lt;DataTemplate&gt;
     &lt;TextBlock Content="{Binding tokenNo}"/&gt;
  
     &lt;Itemscontrol Name="{Binding tokenNo}"&gt;  ?? I tried and want dynamic naming or any other solution for this {Binding name} just won't work i know.??
        ...
        &lt;DataTemplate&gt;
          &lt;Button&gt;
              &lt;Grid&gt;
                 ...
                 &lt;TextBlock Content="{Binding items}/&gt;
                 &lt;TextBlock Content="{Binding quantity}/&gt;
        &lt;/DataTemplate&gt;
  
     &lt;/Itemscontrol&gt;
       ....
     &lt;/DataTemplate&gt;
  &lt;/Itemscontrol&gt;
  </code></pre>
  
  <p>I added the all the necessary data to the tokenList and did the following:</p>
  
  <pre><code>ParentControl.ItemsSource = tokenList;
  </code></pre>
  
  <p>No doubt everything binded properly for the ParentControl. Now I want to fill it's child Itemcontrol with the list currentItems. Since there's going to me multiple parent control, I needed dynamic naming to the children Itemscontrol. Further I cannot access the children ItemsControl from code.</p>
  
  <p>How to make that possible? I don't know if there exist child ItemsControl of ItemsControl itself.</p>
  
  <p>Please suggest me any solution or alternative solution to this problem.</p>
  
  <p>EDIT: I want the user to see the Token Number, time, etc with the list of items that is to be replaced by list of interactive buttons.</p>
  
  <p>Update: slightly modified the XAML content. The children ItemsControl is within the DataTemplate.</p>