Use a PageLayoutControl as an overview window


Purpose
This sample application contains two PageLayoutControls and shows how to use one to view the visible extent of the other.
 
 

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Click the Load button and browse to a map document to load into the PageLayoutControl.
  2. Click to zoom in and right-click to pan the main PageLayoutControl. View the visible extent on the other PageLayoutControl.

Additional information

The Browse dialog box allows you to search and select map documents that are validated and loaded into the main PageLayoutControl, triggering the OnPageLayoutReplaced event. The OnPageLayoutReplaced event determines the MxPath property of the main PageLayoutControl and uses it to load the same document into the second PageLayoutControl with the LoadMxFile method.
 
The OnExtentUpdated event is triggered when you zoom in on the main PageLayoutControl. The event uses the AddElement method to add an element displaying the visible extent of the main PageLayoutControl on the second PageLayoutControl. Any previous elements on the second PageLayoutControl are found using the FindElementByName method and are deleted from the GraphicsContainer. The Refresh method is used to refresh the graphics to reflect the changes.


AssemblyInfo.cs Assembly information.
Overview.cs Form file.
Download the C# files
AssemblyInfo.vb Assembly information.
Overview.vb Form file.
Download the VB.NET files

Download the files for all languages

See Also:

PageLayoutControl class
IPageLayoutControl interface




Development licensing Deployment licensing
Engine Developer Kit Engine Runtime
ArcView
ArcEditor
ArcInfo