title: Injecting a registered class using Autofac
body: <p>I'm new to Autofac and trying to get things working for my first project using it. I'm not sure how inject the registered helper from Autofac? Any help would be appreciated.</p>
  
  <p><strong>App.xaml.cs</strong></p>
  
  <pre><code>private void Application_Startup(object sender, StartupEventArgs e)
  {
      var builder = new ContainerBuilder();
      builder.Register(c =&gt; MyFactory.CreateHelper()).As&lt;IHelper&gt;();
  
      RootVisual = new MainWindow(...);
  }
  </code></pre>
  
  <p><strong>MainWindow.xaml.cs</strong></p>
  
  <pre><code>public class MainWindow
  {
     public IHelper IHelper {get;set;} 
  
     public MainWindow(IHelper helper)
     {
         iHelper = helper;
     }
  }
  </code></pre>