title: Create ComboBox in a loop
body: <p>I need to create ComboBoxes in cells of a variable size grid. So i've made this function to create a ComboBox in a particular cell :</p>
  <pre><code>public void AddCombo(int i, int j, string name, ArrayList array, int index)
      {
          FontFamily fontFamily = new FontFamily(&quot;Berlin Sans FB Demi&quot;);
          ComboBox combo = new ComboBox { Name = name, FontFamily = fontFamily, FontSize = 24, HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, ItemsSource = array, SelectedIndex = index };
          Grid.SetRow(combo, i);
          Grid.SetColumn(combo, j);
          grid.Children.Add(combo);
      }
  </code></pre>
  <p>Then i create my ComboBoxes in a for loop but i don't know how to get the SelectedItem of each of them. Since the combobox's name is a variable,the name.SelectedItem isn't working...</p>
  <p>Do you know how could i do ?
  Thx</p>