WebView2 file download notification box

Viewed 1436

I have what seems like a stupid problem. I have been working on a WebView2 app for a couple of days now. Prior to today, when I would download a file within the app, I would get the usual download notification box in the lower left. Now I'm getting this popup window on the upper right. I don't know what has changed. I've gone back to old code in which I didn't see this behavior and it does it there also. I need to move it back to the lower left. Does anyone know what I have done or how to change this back? Thanks for any help. Kevin.

enter image description here

2 Answers

I suggest you take full control of the dialog (I don't think you can easily just move it).

You do that by subscribing to the CoreWebView2.DownloadStarting event: CoreWebView2.DownloadStarting.

The CoreWebView2DownloadStartingEventArgs has a property DownloadOperation (see CoreWebView2DownloadOperation giving you access to the progress.

Here you can totally define, what should happen, in your case showing a progress dialog.

To see an example of this, you can check my answer HERE

The Edge browser and the WebView2 Runtime updated the download UX to what you see now. The WebView2 release notes note this happened near July 26, 2021.

The download UX is implemented in the WebView2 Runtime. If you have an older Fixed Version copy of the WebView2 Runtime you would be able to see the old download UX. Changing the WebView2 SDK version will not change which download UX you get.

This is the default download UX for WebView2. You can replace it with your own custom download UX using the CoreWebView2.DownloadStarting event and associated APIs.

Related