SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
I’m using the YAxisDragModifier to pan one or more Yaxis.
// Add a new YAxisDragModifier for this axis var yAxisDragModifier = new YAxisDragModifier(); yAxisDragModifier.DragMode = AxisDragModes.Pan; yAxisDragModifier.AxisId = axisId; yAxisDragModifier.ReceiveHandledEvents = true; yAxisDragModifier.MouseUp += new System.Windows.Input.MouseButtonEventHandler(yAxisDragModifier_MouseUp); yAxisDragModifier.MouseDown += new System.Windows.Input.MouseButtonEventHandler(yAxisDragModifier_MouseDown); this.ChartModifier.ChildModifiers.Add(yAxisDragModifier);
I like to capture the MouseUp event, but it won’t work.
How can I do this?
Thanks and best regards,
The Modifiers are not in the visual tree. We use some special techniques to route mouse events to them and allow databinding while not held in the visual tree.
May I suggest subclassing YAxisDragModifier and overriding OnModifierMouseDown, OnModifierMouseMove, OnModifierMouseUp. Ensure you call the base method in each override.
There you will see if you set a breakpoint in these override methods that these are hit on mouse interaction. You could add your own event here to notify subscribers that a change has occurred.
Please login first to submit.