title: Embed a PDF into a WPF application
body: <p>I'm trying to embed/display a PDF in a WPF application. So far, I've tried those solutions, without success:</p>
  
  <ol>
  <li><p>Display the PDF in a <code>WindowsFormsHost</code> hosting an <code>AxAcroPdf</code>
  control, similarly to what's shown <a href="http://hugeonion.com/2009/04/06/displaying-a-pdf-file-within-a-wpf-application/" rel="nofollow">here</a>. The problem is that my application sets <code>AllowsTransparency
  = True</code> to create a style similar to <a href="http://en.wikipedia.org/wiki/Modern_UI_%28design_language%29" rel="nofollow">Modern UI</a>, but
  that doesn't blend well with a <code>WindowsFormsHost</code> (the control
  becomes invisible).</p></li>
  <li><p>Display the PDF in a <code>WebBrowser</code> control. The problem is the same.</p></li>
  <li><p>Set <code>AllowsTransparency = False</code>, but this causes a sluggish feeling in the application. Since I use WPF purposedly to enhance the look and feel of our business applications to the benefit of our end-users, this can't be a solution.</p></li>
  <li><p>Use a second window with <code>AllowsTransparency = False</code> to display the <code>WindowsFormsHost</code>, and hack it to make it look like a child control of the main window, as it's described <a href="http://mrtncls.blogspot.ca/2011/07/windowsformshost-on-transparent-wpf.html" rel="nofollow">here</a>. However, I don't like the code-behind approach since I'm using MVVM.</p></li>
  <li><p>Find a native PDF control for WPF. However, I only found a couple of commercial ones and that's not an option right now.</p></li>
  </ol>
  
  <p>What I need is to be able to:</p>
  
  <ul>
  <li>Display a PDF or its representation (i.e. an image or a conversion to another format) in a WPF application.</li>
  <li>Keep my style visually intact and fluid (<code>AllowsTransparency</code> must stay <code>True</code>).</li>
  <li>Use an approach respecting the principles of MVVM (preferably no code-behind).</li>
  <li>Include it in my application for free (for commercial usage).</li>
  </ul>
  
  <p>I'm totally open to hand-made solutions, open-source libraries and even completely different approaches.</p>