How to disable the rectangle zoom

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
Micha_el
Posts: 7
Joined: Wed Nov 15, 2023 12:25 pm

How to disable the rectangle zoom

Post by Micha_el » Wed Nov 15, 2023 12:34 pm

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.

ArctionKestutis
Posts: 555
Joined: Mon Mar 14, 2016 9:22 am

Re: How to disable the rectangle zoom

Post by ArctionKestutis » Wed Nov 15, 2023 3:18 pm

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.

Micha_el
Posts: 7
Joined: Wed Nov 15, 2023 12:25 pm

Re: How to disable the rectangle zoom

Post by Micha_el » Thu Nov 16, 2023 8:31 am

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

Post Reply