title: change the default download folder in CefSharp
body: <p>In a visual basic (.NET) project I am using CefSharp (Nugget). How can I change the browser download folder? In the official CefSharp documentation the developers talk about the IDownloadHandler interface. This class is used to handle <a href="https://cefsharp.github.io/api/51.0.0/html/N_CefSharp.htm" rel="nofollow noreferrer">CefSharp</a> file downloads. Based on what I <a href="https://stackoverflow.com/questions/42820755/download-files-in-cefsharp-to-a-directory-allow-user-to-open">investigated</a>, I could try to instantiate IDownloadHandler like this:</p>
  <pre class="lang-cs prettyprint-override"><code>public class DownloadHandler : IDownloadHandler
  {
      public event EventHandler&lt;DownloadItem&gt; OnBeforeDownloadFired;
  
      public event EventHandler&lt;DownloadItem&gt; OnDownloadUpdatedFired;
  
      public void OnBeforeDownload(IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback)
      {
          var handler = OnBeforeDownloadFired;
  
          if (handler != null)
          {
              handler(this, downloadItem);
          }
  
          if (!callback.IsDisposed)
          {
              using (callback)
              {
                  callback.Continue(@&quot;C:\Users\&quot; + 
                          System.Security.Principal.WindowsIdentity.GetCurrent().Name. + 
                          @&quot;\Downloads\&quot; + 
                          downloadItem.SuggestedFileName, 
                      showDialog: false);
              }
          }
      }
  
      public void OnDownloadUpdated(IBrowser browser, DownloadItem downloadItem, IDownloadItemCallback callback)
      {
          var handler = OnDownloadUpdatedFired;
          if (handler != null)
          {
              handler(this, downloadItem);
          }
      }
  }
  </code></pre>
  <p>My question is, where should I apply this code, I am guessing not in my visual basic program, which makes me think the changes need to be done on the source code of CerfSharp? If so, how can I do it?</p>
  <p>Thanks a lot everyone!</p>