Hi.
Im trying to do this:
WebBrowser webBrowserForPrinting = new WebBrowser(); // Add an event handler that prints the document after it loads. webBrowserForPrinting.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(PrintDocument); // Set the Url property to load the document. webBrowserForPrinting.Url = new Uri(@"\\myshare\help.html");
Copy/Pasted from: http://msdn.microsoft.com/en-us/library/b0wes9a3.aspx
but I get this message:
Error 1 'System.Windows.Controls.WebBrowser' does not contain a definition for 'DocumentCompleted' and no extension method 'DocumentCompleted' accepting a first argument of type 'System.Windows.Controls.WebBrowser' could be found (are you missing a using directive or an assembly reference?)
Error 4 'System.Windows.Controls.WebBrowser' does not contain a definition for 'Url' and no extension method 'Url' accepting a first argument of type 'System.Windows.Controls.WebBrowser' could be found (are you missing a using directive or an assembly reference?)
I'm using VS2012 and I started WPF project.
btw WebBrowser control works all right. It loads pages and all. But where on earth did 'DocumentCompleted' event dissapeared.
This is so frustrating. I just installed VS2012. Why can't I never get something that is not broken. Am I only person who got special cripled version of WebBrowser with no crutial events, just to irritate me, and make me feel like an idiot. I just
wanted to know when document finished loading. And everyone on the internet is using DocumentCompleted, but noo not me. I don't have it.
system.dll (where I guess WebBrowser is located) is version v4.0.30319