Logo
My Account |  Site Map | Contact Us  
 The same content in Microsoft HTML help file format is included in the download package.
Customizing Download

EO.WebBrowser provides several download related events that together allow you to control file download and display download information. These events are:

  • BeforeDownload. This event is fired before a download starts. The Item property of the DownloadEventArgs contains a DownloadItem object, which contains detailed information about the download. Inside this event handler you can:

    • Do nothing. In this case the browser engine will continue download and display a "Save As" dialog to prompt for the file name. You can handle the WebView's FileDialog event to provide a custom dialog. If you do not handle the FileDialog event, the default dialog is used.
    • Set the event argument's ShowDialog to false. This instructs the browser engine to continues silently and the file is saved to your temp directory;
    • Call the DownloadItem's Cancel method to cancel the download;
  • DownloadCanceled. Occurs when a download has been cancelled;
  • DownloadCompleted. Occurs when a download has been completed;
  • DownloadUpdated. Occurs when the download progresses. You can use this event to update download progress information;

There is no default implementation to display download progress information. So if you wish to support download, you should handle DownloadCanceled, DownloadCompleted and DownloadUpdated to provide UI feedbacks for the downloads. The "Tabbed Browser" sample uses these events to display all download items in a docking view.


Direct link to this topic