Is it possible to bind EnablePanning and EnableSelectionZooming? Having no luck...

On SfChart in WPF, it doesn't seem possible to enable both SelectionZooming and panning at the same time. In winforms, I could dodge this by looking for ctrl to be up or down and then switching between zoom and pan modes accordingly. 

In the WPF MVVM version, I'm having more trouble with this than it is in winforms, since I want to not have code-behind. Is there a way to re-map the pan behavior so that it pans with the right mouse button and zooms with the left? Your documentation shows that panning occurs with the middle mouse button/wheel, but on my system, both panning and selection zooming happen on the left mouse button, which is probably why you can't enable both.

I've tried binding SelectionZooming and Panning and swapping modes with a right mouse click but that doesn't seem to work either.


3 Replies

AJ Arul Jenith Berkmans Syncfusion Team October 25, 2024 02:59 PM UTC

Hi Thomas Brand,


We have reviewed your query and would like to inform you that currently, selection zooming and panning cannot be used at same time in WPF SfChart. We are actively investigating the behavior of this functionality and will provide further details within two business days (Oct 29, 2024).


In the meantime, we suggest using the scroll bar as an alternative for panning. Here is an example code snippet for enabling the scroll bar:


<chart:SfChart.PrimaryAxis>

     <chart:CategoryAxis EnableScrollBar="True">

     </chart:CategoryAxis>

 </chart:SfChart.PrimaryAxis>


Thank you for your patience and understanding.


Regards,

Arul Jenith B.



AJ Arul Jenith Berkmans Syncfusion Team October 29, 2024 03:21 PM UTC

Hi Thomas Brand,

We are currently investigating this functionality and need to confirm the behavior to provide an appropriate solution. We will update you with further details by tomorrow (Oct 30, 2024).

Thank you for your patience and understanding.

Best regards,
Arul Jenith B.



AJ Arul Jenith Berkmans Syncfusion Team October 30, 2024 12:59 PM UTC

Hi Thomas Brand,

 

We have investigated the functionality and, unfortunately, enabling panning and selection zooming simultaneously is not currently possible. In your case, panning with right-click was not convey the intended behavior, so we recommend implementing a context menu on right-click to toggle between panning and selection zooming modes.

 

We have attached a sample for your reference. Please review it for more details. If need any further assistance, feel free to ask.

 

Hope this helps! Thank you for your patience and understanding.

 

Best regards,

Arul Jenith B.


Attachment: EnablePanningAndSelectionZooming_1b3f89f8.zip

Loader.
Up arrow icon