Wpf webbrowser, how to detect when it tries to download?
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?
精彩评论