About GoOverview's ViewChanged method

I’m wanting to redefine some of the behaviour of GoOverview when the observed GoView’s DocScale and DocPosition are changed.

Basically, when the observed GoView's DocScale and DocPosition are changed, the GoOverview's DocScale and DocPosition should not change.
But the user can change the GoOverview's DocScale and DocPosition using Ctrl+Mouse operation, and even right mouse buttong drag. Because GoOverview's ViewChanged method is not virtual, how can I disable its default behaviour?

If I understand it correctly, when the observed view’s DocScale or DocPosition property changes, the GoOverview.DocScale does not change. Only the GoOverview.DocPosition may change, due to trying to keep the GoOverviewRectangle scrolled so that it is visible.

Did you want to change the behavior so that that GoOverviewRectangle does not remain visible in the overview? If so, maybe one possibility is to override GoOverview.ScrollRectangleToVisible to be a no-op. That's assuming you aren't calling that method for other purposes, of course, although there's an easy work-around for that.

Many thanks. I’m sorry I did not explain my problem clearly.

After playing around with GoOverview for a while, I know what I exactly want.
By default, the OverviewRect always contains exaclty the same area shown in the observed GoView. Because I redesigned GoView and GoDocument, this default behaviour is not I want.
In my program, the OverviewRect will not always contain the same area shown in the observed GoView; some time it will, but not always. In my GoView, there is a page layout with gray margins which are included in GoDocument. I want the OverviewRect only contains the area in the page what is shown in the observed GoView, excluding the margins (even though the are also shown in the observed GoView).
This may seem strange since sometimes, GoOverview’s OverviewRect does not contain the same area shown in the observed GoView, but I do need this.

Bascially, I want to define my own OverviewRect when the DocScale and DocPosition of the observed view is changed. It will only contains the same area inside the page which is shown in the observed GoView.

But the OverviewRect property is readonly and not virtual, the problem becomes how I can override the default calculation of OverviewRect of GoOverview?

It sounds to me like you would really prefer being able to override the GoOverviewRectangle.UpdateRectFromView method, since that is what actually sets the Bounds of the rectangle.

If this is the case, I can make this method virtual for the next release, 2.5.3, which should be coming out soon. You can override GoOverview.CreateOverviewRectangle to create an instance of your special GoOverviewRectangle class. This is called whenever the overview needs a rectangle, for example when the ObservedView is changed or when the document is swapped with a new document.

Thanks, walter.

Because the scale of our project and other tasks at hand, we are currently still stiking to GoDiagram 2.4 though we know there are a lot of features in GoDiagram 2.5 which are exactly we were waiting for. We will update all our developing tools and libraries in the near future.
I think I can create a derived GoOverviewRectangle class and to see if I can change its bound in one of its overridable methods.

I subclassed GoOverviewRectangle and overrided OnBoundsChanged method to ajust its Bounds according to the ObservedView. It all works as we expect now.