开发者

Wpf webbrowser, how to detect when it tries to download?

开发者 https://www.devze.com 2023-03-25 04:15 出处:网络
When you 开发者_JS百科use the C#.Net wpf WebBrowser control to view html pages, and the user clicks on a link to a file with an unknown extension, the webbrowser tries to download this file.

When you 开发者_JS百科use the C#.Net wpf WebBrowser control to view html pages, and the user clicks on a link to a file with an unknown extension, the webbrowser tries to download this file.

On systems with no pdf viewer installed, webbrowser tries to download pdf files instead of either displaying them or warning the user that they need Adobe, etc.

I would like to detect when a webbrowser tries to download, so I can check if the file is pdf and then provide a download link.

Is this possible?

0

精彩评论

暂无评论...
验证码 换一张
取 消