Diagram auto-panning and delayed scrollbar appearance

Hi Walter,

I’m observing an issue with the scrolling and positioning behavior in my GoXam diagram.
On load, no scrollbars are visible, even though both horizontal and vertical scrollbars are set to Visible. The diagram initially contains only a single node placed at the center. When I drag this node horizontally or vertically, the diagram canvas automatically shifts instead of showing scrollbars.
Only after I move the node far enough beyond the visible bounds, the scrollbars appear, but until then, the diagram keeps auto-panning to keep the node within view.
Additionally, when I delete all nodes, the canvas again repositions itself automatically, which I’d like to avoid.

My goal is to:

*Show scrollbars immediately on load, even with a single node.
*Keep the canvas fixed, disabling any automatic movement or repositioning when nodes are dragged or deleted.
*Current setup is :-
<go:Diagram
HorizontalContentAlignment=“Stretch”
VerticalContentAlignment=“Stretch”
HorizontalScrollBarVisibility=“Visible”
VerticalScrollBarVisibility=“Visible” />
Could you please confirm what triggers this auto-panning or repositioning behavior, and how I can ensure the canvas remains fixed with scrollbars visible at all times?

Yes, that is intentional, just as it is with normal document viewers or editors such as HTML web browser windows. The idea is to prevent the window from appearing empty even though there are Nodes and Links somewhere else, which is a situation that users find confusing or disconcerting.

There are a lot of possibilities here, and many reasonable ones. I suspect that you cannot set it up to behave like you want. You could try increasing the DiagramPanel.Padding property so that there is extra empty space around the area where the Nodes and Links are, and they will be able to scroll there.

The “Content Alignment and Stretch” section of the GoXam Introduction document, starting at page 59, may help explain some of the available properties.