title: Accessing child of ListBoxItem
body: <p>I have a ListBox with a DataTemplate that looks like this:</p>
  
  <pre><code>    &lt;ListBox Name="listBox"&gt;
          &lt;ListBox.ItemTemplate&gt;
              &lt;DataTemplate DataType="x:Type local:NumericIconDefinition"&gt;
                  &lt;Grid&gt;
                      &lt;ComboBox Name="IconComboBox"/&gt;
                  &lt;/Grid&gt;
              &lt;/DataTemplate&gt;
          &lt;/ListBox.ItemTemplate&gt;
      &lt;/ListBox&gt;
  </code></pre>
  
  <p>I would like to fetch the ComboBox instance <a href="https://stackoverflow.com/questions/1553142/bitmapframe-in-wpf-combobox">in order to manipulate it</a> in the code behind. I found a blog post that explained the process of fetching the ListBoxItem:</p>
  
  <pre><code>ListBoxItem lbi = (ListBoxItem)listBox.ItemContainerGenerator.ContainerFromIndex(IndexInListBox);
  </code></pre>
  
  <p>But I cant find a good way to access the Grid and then ComboBox instances in that item. Ideally, building upon the code above, I would like to do something like this:</p>
  
  <pre><code>ComboBox cb = (ComboBox)lbi.GetChildByName("IconComboBox");
  </code></pre>