c# - WPF WebBrowser Mouse Events not working as expected -


I have a WebBrowser object in the WPB page and whenever I interact with the page I am trying to do something I am I have freely tried to use events associated with web browser objects, but they are not looking for frying. Below is a simple example of what my code is doing:

  webBrowser.MouseDown + = New MouseButtonEventHandler (webBrowser_MouseDown);  

with event handler:

  zero webbrowser_MouseDown (Object Sender, MouseButtonEventArgs e) {System.Windows.MessageBox.Show ("pressed"); }  

But when I click on the page and click inside the webbrowser, no message box is displayed.

Forgiveness, basically I had said that it was a system. Control web browser instead of a form browser

mouse event WebBrowser control, You need to hook the handler to the DOM event provided by the document displayed in the control by using the WebBrowser.Document property. An example of this is how to do it.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -