title: CommonOpenFileDialog put my window behind all other windows
body: <p>I'm using CommonOpenFileDialog (from Windows API Code Pack) to pick a directory and somehow it send my window to the back. This is really frustrating as I have to find it in the task bar and click on it again. </p>
  
  <p>Here is the code: </p>
  
  <pre><code>    public string ShowPickDirectoryDialog()
      {
          var dialog = new CommonOpenFileDialog { IsFolderPicker = true };
          if (dialog.ShowDialog() == CommonFileDialogResult.Ok)
          {
              return dialog.FileName;
          }
          return null;
      }
  </code></pre>
  
  <p>I found a similiar question here: </p>
  
  <p><a href="https://stackoverflow.com/questions/20039311/how-to-bring-the-main-form-back-to-the-front-after-the-file-open-dialog-is-close">How to bring the main form back to the front after the file open dialog is closed</a></p>
  
  <p>But I'm using WPF/MVVM and don't have access to the window object so none of those answer would work. So how do I make sure that my window are at the front after I used CommonOpenFileDialog when I don't have access to the window object? I also can't use the "TopMost" setting as that would put the window in front of the directory picker.</p>
  
  <p>Or is there anything better than CommonOpenFileDialog that I should use (that isn't ugly)? </p>