title: Doubled instances of all views/viewmodels with Simple Injector
body: <p>Trying MVVM with Simple Injector, I followed this guide: <a href="https://simpleinjector.readthedocs.io/en/latest/wpfintegration.html" rel="nofollow noreferrer">https://simpleinjector.readthedocs.io/en/latest/wpfintegration.html</a></p>
  <p>Even with the simplest example having just MainWindow.xaml + MainWindowViewModel it creates double instances of View and ViewModel (I did try to ommit verification of container too). Moreover, after application gets closed, process still remains running.</p>
  <pre><code>    [STAThread]
      static void Main()
      {
          var container = new Container();
          container.Register&lt;MainWindow&gt;();
          container.Register&lt;MainWindowViewModel&gt;();
  
          var app = new App();
          app.InitializeComponent();
  
          var mainWindow = container.GetInstance&lt;MainWindow&gt;();
          app.Run(mainWindow);      
      }
  </code></pre>
  <p>I did however replace <code>StartupUri</code> in <code>App.xaml</code> to <code>Startup</code> method which is empty as if I hadn't done that <code>app.InitializeComponent()</code> method wouldn't be available.</p>
  <p>Any suggestions on DI Container to use for MVVM purpose?</p>