title: The calling thread must be STA, because many UI components require this in WPF
body: <p>My scenario:</p>
  
  <pre><code>   void Installer1_AfterInstall(object sender, InstallEventArgs e)
      {
          try
          {         
  
                MainWindow ObjMain = new MainWindow();               
                ObjMain.Show();              
          }
          catch (Exception ex)
          {
              Log.Write(ex);
          }
      }
  </code></pre>
  
  <p>I got error  "The calling thread must be STA, because many UI components require this"</p>
  
  <p>what i do?</p>