title: How to load a UserControl in WPF with reflection?
body: <pre><code>private void Window_Loaded(object sender, RoutedEventArgs e)
  {
      var assm = Assembly.LoadFrom("wpflib.dll");
      foreach (var t in assm.GetTypes())
      {
          var i = t.GetInterface("test.ILib");
          if (i != null)
          {
              var tmp = Activator.CreateInstance(typeof(UserControl)) as UserControl;
              this.stackPanel1.Children.Add(tmp);
          }
      }
  }
  </code></pre>
  
  <p>tmp(UserControl1 in wpflib.dll) only contains a label and a textbox.</p>
  
  <p>Windows1 (test.exe) reference ILib.dll, and only contains a  stackPanel1.</p>
  
  <p>But, why there is nothong in Windows1(stackPanel1)?</p>