SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
I am using WPF with SciChart version 126.96.36.1997 and the MVVM pattern.
I am using a series of modifiers like the ZoomPanModifier in a similar manner to samples that you provide that I load from an attached behaviour.
I am adding a feature to adjust the visible range when new data points arrive that would not otherwise be visible; however, if a user pans the surface I want to detect that so I can stop adjusting the visible range.
My thinking is that I need to capture a mouse event either associated with the chart to the current modifier; however, nothing I seem to do allows me to capture a mouse event. If their is a better way I am open to that as well.
You can try this technique: http://http://www.scichart.com/questions/question/sharing-mouse-events-one-way/
Someone asked only yesterday how to prevent mouse events going from one chart to another. The solution was to override OnModifierMouseMove on the modifier in question and selectively call the base method.
It would be verbose but if you created derived types of the modifiers you are using, then overrode the OnModifierMouseDown, OnModifierMouseMove, OnModifierMouseUp events you could detect mouse on specific modifiers.
Another method – a lot simpler – you can subscribe to ((Grid)SciChartSurface.RootGrid).PreviewMouseDown and in there, stop adjusting visible range. Then subscribe to MouseDoubleClick to restore visible range adjustment.
Can you try those and let me know how you get on?
Please login first to submit.