Touch Support on Windows 8

Dec 4, 2012 at 10:24 PM

Hi, 

I have a question regarding the touch support of OxyPlot on Windows 8:

I ran the Metro Example Browser application and it seems that panning with one finger and pinch-zooming with two fingers of a plot is not enabled there.

The WPF Example Browser application has support for those touch-interactions, however the update-rate of a plot while doing any of those gestures feels pretty laggy compared to doing the same thing with regular mouse-interactions.

Has anybody experienced similar issues?

Thanks a lot!

Coordinator
Dec 5, 2012 at 10:34 PM

Right, the touch manipulation events are not implemented on the windows 8 app control. I have not looked at the API yet, but hope the events will be similar to the ones in WPF.

I remember I noticed the same response problems as you describe when I implemented the WPF touch events. I don't have any touch capable hardware now, so need info from others to solve those bugs.

Nov 8, 2013 at 6:47 AM
Edited Nov 8, 2013 at 12:01 PM
I am trying to implement touch support in the Metro version of OxyPlot.

I have added
this.ManipulationMode = ManipulationModes.Scale | ManipulationModes.TranslateX | ManipulationModes.TranslateY;
to the contructor of the Plot class. This enables the overridden Manipulation methods to be called.
I have reached the point where I have noticed that OnManipulationDelta only happens once and OnManipulationCompleted never gets called. If I comment out the Panning and Zooming code in OnManipulationDelta then the methods are called. It seems like the calls to UpdateVisuals is somehow stopping the framework from calling the OnManipulationDelta more than once as well as OnManipulationCompleted.

Any ideas why this is happening? is there a lock or something else in UpdateVisuals that is preventing the UI thread from processing the touch manipulation events, Panning and Zooming done with the mouse (via the OnPointerxx methods) seems to work fine.

thanks

Update, the culprit seems to be this.canvas.Children.Clear(); in UpdateVisuals()
see a similar problem on
http://stackoverflow.com/questions/6418899/in-windows-phone-7-manipulationdelta-event-does-not-work-as-expected
Any ideas on how to fix this?