title: WPF: How to create Multiple instances of a UserControl inside a for loop with different name?
body: <p>I am creating a WPF window, inside which I am creating multiple instances of a UserControl.
  I am using a for loop to create a new instances of the UserControl, how can I give different name to the UserControlinstance?
  This is what I am doing:</p>
  
  <pre><code>    for(i=0; i&lt;5; i++)
      {
          MyUserControl &lt;name&gt; = new MyUserControl ();
          /*code to change the properties of usercontrol*/
          SomeStackPanel.Children.Add(&lt;name&gt;);
      }
  </code></pre>