Let's say that WPF WebBrowser control shows some navigation errors and the page does not display.
So there is a WPF WebBrowser control exception.
I found several similar questions here , but that is not what I need.
Actually, I need some kind of method and an object that has an exception in order to get it somehow.
How can we handle this?
Thanks!
PS There is some approach for WinForm WebBrowser Control ... Can we do something similar for a WPF WebBrowser ?
public Form13() { InitializeComponent(); this.webBrowser1.Navigate("http://blablablabla.bla"); SHDocVw.WebBrowser axBrowser = (SHDocVw.WebBrowser)this.webBrowser1.ActiveXInstance; axBrowser.NavigateError += new SHDocVw.DWebBrowserEvents2_NavigateErrorEventHandler(axBrowser_NavigateError); } void axBrowser_NavigateError(object pDisp, ref object URL, ref object Frame, ref object StatusCode, ref bool Cancel) { if (StatusCode.ToString() == "404") { MessageBox.Show("Page no found"); } }
PS # 2 To place a WinForm WebBrowser control in a WPF application, I don't think so.
Academy of programmer
source share