title: Handle back command in custom ContextMenuHandler
body: <p>I have implemented a custom <code>ContextMenuHandler</code>:</p>
  
  <pre><code>public bool OnContextMenuCommand(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IContextMenuParams parameters, CefMenuCommand commandId, CefEventFlags eventFlags)
  {
      if (commandId == (CefMenuCommand)26501)
      {
          // custom logic
          return true;
      }
  
      if (commandId == CefMenuCommand.Back)
      {
          Dispatcher.CurrentDispatcher.Invoke(() =&gt;
          {
              if (chromiumWebBrowser.CanGoBack) chromiumWebBrowser.Back();
          });
  
      }
  
      return true;
  }
  </code></pre>
  
  <p>The custom command works as expected. However, the <em>Back</em>-command doesn't work. The thread doesn't have access to the browser instance:</p>
  
  <blockquote>
    <p>The calling thread cannot access this object because a different
    thread owns it.</p>
  </blockquote>
  
  <p>Omitting the dispatching logic doesn't solve the problem.</p>
  
  <ol>
  <li>Do I need to explicitly handle the <em>Back</em>-command using the if-statement (will be refactored to swicth-case, no worries)</li>
  <li>If yes, how?</li>
  <li>In general, how can I get the dispatcher of the web browser instance?</li>
  </ol>