Hi,
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,
Egbert
- EJansen asked 10 years ago
- You must login to post comments
Hi Egbert,
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.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 10 years ago
-
Hi Andrew, This works. Thanks.... Best regards, Egbert
- You must login to post comments
Please login first to submit.