From the Document Coordinates and Size section of the User Guide.
The normal behavior is that the Size property is increased to accommodate objects that are placed beyond where they had been before. However, the Size property does not automatically shrink—not even when all of the objects in the document are removed and the document is empty. The Size property also always includes the (0, 0) point. If you want to find out how much coordinate space all of a document’s objects are actually taking, use the GoDocument.ComputeBounds method. This method calculates the union of the bounds of all of the document objects for which GoObject.CanView() is true, or for which GoObject.CanPrint() is true when the GoView.IsPrinting property is true. If you want to automatically shrink the document’s extent as objects are moved or removed, you will need to override GoDocument.OnChanged to notice when objects are removed, and override UpdateDocumentBounds to calculate any extent adjustments.
this.Document.Bounds = this.Document.ComputeBounds();