Support multi-touch in WPF WebBrowser RRS feed

  • Question

  • I am trying to use Three.js to create a WebGL cross-platorm 3D rendering solution. My plan is to create my renderer with Three.js and then just embed it in a WebBrowser type component for each platform that I want to target. Ultimately I plan on targeting Win 8.1 Store, WP 8.1, Win Desktop, Linux, Mac, Android and iOS. I have already got my renderer working 100% in WP 8.1 in Win 8.1 Store but I am now struggling to get it working for Win Desktop.

    My problem is with getting multi-touch working properly with my renderer running in a WPF WebBrowser control. I used Hammer.js to implement touch and it is working on the afore mentioned platforms. Strangely enough it also works just fine in plain desktop IE 11. The problem with the control is that the control seems to capture all muti-touch gestures and convert them to legacy actions like simple page scaling instead of giving it to my JS which can handle it better (like actuallly zooming) and understand more gestures. After quite a struggle I have managed to get it working by using a FEATURE_NINPUT_LEGACYMODE registry key but I would prefer not to mess with the registry for this app.

    I guess it would be safe to assume that the registry modifications are needed but it seems that both and support pinch to zoom correctly without me touching the registry.

    Any idea what I should do in my HTML to get this working? Anything else that I can do in code that does not need administrator privelages could also work. I have already tried the adding "touch-action:none; ms-touch-action:none" to my body's style but this does not help here. It was though crucial for getting it to work on the other platforms.

    PS. I have got the WebBrowser component running in IE 11 mode through the compatibility tag and thereby avoided modifying the registry for that. I did though have to enable IE 11 mode in the registry to test Bing Maps properly but Google Maps seemed to somehow even be able to handle pinch to zoom properly even in IE 7 mode.

    PPS. I would prefer to implement touch support in something cross-platform like Hammer.js instead of using IE specifics for obvious reasons.

    Saturday, July 5, 2014 9:52 PM