Reputation: 3298
I have a WebBrowser in my application, I need to know where the position of primary touch is in the screen.
this event not fired in the WebBrowser:
Touch.FrameReported += new TouchFrameEventHandler(Touch_FrameReported);
and also this:
GestureService.GetGestureListener(webBrowser1);
How I can do this?
Upvotes: 0
Views: 311
Reputation: 781
The PhoneGap Wp7 page claims that this is not possible from a WebBrowser control. See the Gotchas section towards the bottom:
"IE9 does not expose touch events, or even mouse events to JavaScript. The only UI event that is available to your code is the click event."
Upvotes: 1
Reputation: 8126
You can add JavaScript function to your page that will call window.external.notify
to send touch position from WebBrowser
to your C# code. You will need to subscribe to WebBrowser.ScriptNotify
event and allow JavaScript execution in WebBrowser
.
Upvotes: 1