title: Wait for a page to load with CefSharp
body: <p>first and foremost I am a novice at C# and learning Cefsharp + javascript as I go so please attempt to comment any solution you feel are necessary, will save me asking stupid questions.</p>
  
  <p>I'm attempting to wait until the page has finished loading with Cefsharp to execute my code, I have tried several solutions found on other stackoverflow questions / github but no go.</p>
  
  <p>I thought the solution was "NavStateChanged" but I'm getting a C# error of:
  "ChromiumWebBrowser does not contain a definition for 'NavStateChanged'"</p>
  
  <p>Could anyone point me in the right direction or throw me a snippet ? I'm not asking you to write the entire thing for me but I'm genuinely lost here, im learning C#, Cefsharp &amp; javascript all at once and well... its overwhelming.</p>
  
  <p>This is the code I found while looking for a solution online, it also matches a lot of the github references but doesn't seem to work :/</p>
  
  <pre><code>EventHandler&lt;NavStateChangedEventArgs&gt; handler = null;
  handler = (sender, args) = &gt; {
  
      //TODO : show a loading gif until the page load completes
  
      //Wait for while page to finish loading not just the first frame
      if (!args.IsLoading)
      {
          chromeBrowser.NavStateChanged -= handler;
  
          MessageBox.Show("The page has completed loading", "Load completed", 
                          MessageBoxButtons.OK);
          //TODO : once load complete show the actual page
      }
  </code></pre>