title: How to configure StructureMap in a WPF application?
body: <p>I'm developing an application in WPF and I want to know how to begin configuring StructureMap. I'm coming from an MVC background where I would normally configure StructureMap in Global.asax.</p>
  
  <p>The following article suggests that I put the configuration in the <code>main()</code> method</p>
  
  <p><a href="http://structuremap.net/structuremap/ConfiguringStructureMap.htm" rel="nofollow">http://structuremap.net/structuremap/ConfiguringStructureMap.htm</a></p>
  
  <p>but in WPF the <code>main()</code> method is located in <code>App.g.i.cs</code> and states </p>
  
  <blockquote>
    <p>This code was generated by a tool &amp; Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.</p>
  </blockquote>
  
  <p>In WPF there doesn't seem to be a suitable equivalent of Global.asax, so where should the configuration go?</p>