title: Webview2 Navigation
body: <p>Currently in Webview2 browser if navigated to a particular URL as written below</p>
  <pre><code>browser.Source = URL;
  </code></pre>
  <p>This triggers NavigatingStarting event asynchronously.</p>
  <p>How can I trigger a synchronous call for each source being set to trigger the event?</p>
  <p>Problem: I am keeping a bool variable to check for the if navigation triggered inside my application and resetting it at the end for the navigatingstarting event. since it is an asynchronous call it is resetting after the first call without the next call being inside my application.</p>
  <pre><code>    void SetBrowserUrl(Uri value)
      {
      m_bInsideNavigateCall = true;
      priorsWebBrowser.Source = value;
      }
      
      void priorsWebBrowser_NavigationStarting(object sender, CoreWebView2NavigationStartingEventArgs e)
      {
      if(m_bInsideNavigateCall)
      {
  
      e.Cancel = false;
         m_bInsideNavigateCall = false; // Reset for next inside call
      }
      else
      {
        e.Cancel = true;
      }
      }
  
  </code></pre>
  <p>Here the issue is if call SetBrowserUrl twice. Navigate starting cancels the second call made because it is not synchronous</p>