Page 1 of 1

How to disable the rectangle zoom

Posted: Wed Nov 15, 2023 12:34 pm
by Micha_el
Hi,

is ist possible to completely disable the rectangle zoom mode when moving the mouse while left button is down?
Our intention is to allow the user to enable/disable this mode via button press. Therefore we're looking for a programmatically way to enable /disable this zoom mode.

Thanks in advance.

Re: How to disable the rectangle zoom

Posted: Wed Nov 15, 2023 3:18 pm
by ArctionKestutis
Yes it is possible to tune zooming and panning behavior to your liking.
Specifically to you request you should switch property _chart.ViewXY.ZoomPanOptions.DevicePrimaryButtonAction between UserInteractiveDeviceButtonAction.Zoom (default) and None.

As you will noticed there many other properties to control zoom/pan behavior under ViewXY.ZoomPanOptions properties. You can read more about those in User Manual chapter 6.28 Zooming and panning.
There are also event handlers (like Axis.RangeChanged) for fine turning of behavior.

Hope this helps.

Re: How to disable the rectangle zoom

Posted: Thu Nov 16, 2023 8:31 am
by Micha_el
Thanks a lot, that helped.
And there is also a UserInteractiveDeviceButtonAction.Pan setting which would have been my next question where to find that one :D