title: How make the PrintDialog top most
body: <p>I have create an exe and will prompt the print dialog in new thread. <strong>This exe will be run when user click a button from another application</strong>. How can I make the print dialog top most or not allow user switch back to the caller until print dialog was closed ? Thanks.</p>
  
  <pre><code>Thread t = new Thread(() =&gt;
  {
      System.Windows.Controls.PrintDialog pDialog = new System.Windows.Controls.PrintDialog();
      pDialog.PageRangeSelection = PageRangeSelection.AllPages;
      pDialog.UserPageRangeEnabled = true;
  
      Nullable&lt;Boolean&gt; print = pDialog.ShowDialog();
  
      if (print == true)
      {
  
      }
  });
  
  t.SetApartmentState(ApartmentState.STA);
  t.Start();
  </code></pre>