title: Display a progress bar whilst the web browser is loading in WPF
body: <p>I have looked around but I am having difficulty finding a way to implement the following:</p>
  
  <p>I have a WPF application with has a web browser control. I have a file saved on disk, and I am using the Navigate method to load the file.</p>
  
  <p>I have an event handler attached to the web browser LoadCompleted event, and this works.</p>
  
  <p>However, pages can take a long time to load. I want to display a progress bar (ideally in a status bar, but a new window is okay), but I can't find anyway to do this.</p>
  
  <p>Every thing I have tried (background workers, threads) all say that the calling thread must be STA, and it seems that the progress bar, being a UI element, can only be updated on the UI thread - which is blocked by the web browser control during rendering of a page.</p>
  
  <p>Alternatively is there a way to run the web browser control in a new thread? I am guessing not as this is also a UI element.</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>p.s. The progress bar is a simple indeterminate bar; I am not trying to update the status - just display whilst a page is being loaded.</p>