DocumentSize and ScrollRegion

I have a problem with the scroll-region in my application. On the view, there is a GoListGroup to which my elements (> 100) are added. After actions on the elements (expand,…), the documentSize increases very much. This leads to an incorrect scroll-region, that means you can scroll to “empty” parts over and under the ListGroup.



Yes, the extent of a GoDocument determines the range of the scrollbars (and if they are enabled).
The extent of a GoDocument does not shrink automatically as objects are deleted or moved. If your document is growing, it is because there were objects in the extended region. That behavior is implemented by GoDocument.UpdateDocumentBounds.
So you should make sure objects don’t extend (even temporarily) beyond the extent of the document, perhaps by setting GoDocument.FixedSize to true. ComputeBounds does ignore invisible objects, if that matters to your application.
Or else you can shrink the document’s Size and TopLeft properties after your operation(s). You might find the GoDocument.ComputeBounds methods useful, albeit expensive.