ScrollBars on Diagram

I have a little problem here.
All our nodes are fitting in the visible diagram, but if they come to close (estimated 10 Pixels) to the border the diagram is showing a scrollbar.

So i think the needed size is not calculated well.

I remember to have that problem with the standard wpf TabControl also - there I calculate the needed space by myself and set the scrollbar visibility to false, even if the control wants to show them.

Do you have a hint, or a method to do this in diagram also - with account to zoom and pan?

I remember having problems with that due to the asynchronous nature of the panel layout combined with the addition or hiding of scrollbars changing the viewport area.

I’m sorry, but I don’t have any good suggestions at this time.