Hi, I would like to do Pan and Zoom using WPF 4 Multi touch manipulation events. I believe I need to implement a Modifier class to do that. But how should i invoke methods on the chart to do the zooming and panning? And also, when I zoom, I would like it to be in the centre of the manipulation, meaning i would like to zoom at a specific centre on the chart. Please advise. Thanks!
- icube asked 12 years ago
- You must login to post comments
Hello Icube,
In Wpf the touch events are promoted to the mouse equivalent, if they are unhandled, so you could use existing modifiers instead of creating your own. But if you need, you could subscribe to manipulation events on Modifier surface and implement desired behavior:
public override void OnParentSurfaceRendered(SciChartRenderedMessage e) { base.OnParentSurfaceRendered(e); if (!_isSubscribed) { SubscribeModifierSurface(); _isSubscribed = true; } } private void SubscribeModifierSurface() { ((ChartModifierSurface)ModifierSurface).ManipulationStarted += OnManipulationStarted; ((ChartModifierSurface)ModifierSurface).ManipulationCompleted += OnManipulationCompleted; }
What about zoom, RubberBandXyZoomModifier allows to zoom in specific selected area on the chart (please, see this example: http://http://www.scichart.com/Abt.Controls.SciChart.SL.ExampleTestPage.html#/Abt.Controls.SciChart.Example;component/Examples/IWantTo/ZoomAndPanAChart/DragAreaToZoom.xaml ). If your desired functionality is different, please, tell us and we will be glad to help.
If you have any more questions, don’t hesitate to ask!
Best regards,
Yuriy
- Yuriy Zadereckiy answered 12 years ago
- You must login to post comments
Update: SciChart v3.0
In SciChart v3.0 the modifiers have all been enabled to use MultiTouch. Please see our Release note on SciChart v3.0.2 What’s New
4. MultiTouch support
Zooming, panning, axis manipulations, cursors, annotation manipulations via touch screens in WPF and SL
Usage:
Multitouch is enabled by default in SciChart and all existing modifiers now have touch-support. To get a touch-specific pinch zoom action please use the PinchZoomModifier.
- Andrew Burnett-Thompson answered 10 years ago
- You must login to post comments
Please login first to submit.