Require FitView functionality

Hi,
In my application, I want the functionality like FitView. It means that if some objects are displayed beyond the current visible area, then using this functionality, all objects should be visible only in currnt visible area on screen.

Please provide me some hint or code.
Thanks
   goView1.Document.Bounds = goView1.ComputeDocumentBounds();


goView1.RescaleToFit();