Problem between autoscrolling and click/command event

Hi Walter,
I hope you’re well since our last discussion.

I have a simple problem that I can reproduce with your grouping example.

The Click event associated with the button is no longer generated when the group is too large for the View Port.
When the group is not fully visible in the diagram and I click on the button, the panel scrolls to position the group in the center of the View Port. As a result, the button is no longer in the same position as when I started. In this case, I suppose that since there’s nothing left at the click position on the screen, the event associated with the button is no longer triggered.

How can I block autoscrolling/centering, if possible? I’ve found not property to deactivate it.
Is this a bug?

Example:
Before clicking on button “+” - group9 is collapsed

After clicking on Button “+” - group9 is still collapsed but is centered

As you can see, Group is not expanded

Thanks in advance

Sincerely

JJ

I think what is happening is that the Button is getting focus, which causes WPF (by default) to make sure that the focused element is in the viewport. This post might be useful: Centralizing screen when clicking on a node