title: WPF Application_Startup windows decision
body: <p>I am going to stering my WPF program by external parameter - when the program is call.
  <br />
  In App.xaml.cs I added Startup code and remove StartupUri="MainWindow.xaml"</p>
  
  <pre><code>private void Application_Startup(object sender, StartupEventArgs e)
  {
      // Create main application window, starting minimized if specified
      //StartupUri="MainWindow.xaml"
      String[] arguments = Environment.GetCommandLineArgs();
      MessageBox.Show(arguments[1]);
  
      if (arguments[1] == "Window1")
      {
          Window1 mainWindow = new Window1();
          mainWindow.Show();
      }
  
      if (arguments[1] == "Window2")
      {
          Window2 mainWindow = new Window2();
          mainWindow.Show();
      }
  }
  </code></pre>
  
  <p>I worried, because this Application_Startup method is not fired.
  Can any one want to help me? <br></p>