title: How to start WPF based on Arguments
body: <p>I'm currently developing an application that does some file manipulation and I want to be able to do the manipulation through the console or via an UI (I chose WPF).</p>
  
  <p>I pretty much want to say: (psuedo)</p>
  
  <pre><code>if ( Environment.GetCommandLineArgs().Length &gt; 0 )
  {
      //Do not Open WPF UI, Instead do manipulate based
      //on the arguments passed in
  }
  else
  {
      //Open the WPF UI
  }
  </code></pre>
  
  <p>I've read about a few different ways of starting the WPF Window/application programmatically like:</p>
  
  <pre><code>Application app = new Application ();
  app.Run(new Window1());
  </code></pre>
  
  <p>But I'm not entirely sure I want to just plug this into a Console Application.</p>
  
  <p>Does anyone have best practices or recommendations on how I can achieve this? The main processing functionality is in a Helper class I created. So basically I either want a static start method (like standard Console Application creates) or the UI to access the Helper class depending on the arguments passed in. </p>