Touch Support on Windows 8

Oystein Bjorke 6 years ago 0
This discussion was imported from CodePlex

ez1 wrote at 2012-12-04 22:24:


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!

objo wrote at 2012-12-05 22:34:

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.

vicente001 wrote at 2013-11-08 06:47:

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.


Update, the culprit seems to be this.canvas.Children.Clear(); in UpdateVisuals()
see a similar problem on
Any ideas on how to fix this?