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.
- Start Visual Studio, open the solution, and build the project.
- Press F5 or double-click the resulting executable to run the application.
- Use the Open Map Document command to load a new map document to the application.
- Zoom in and add graphic elements using the Graphics toolbar at the bottom on the application window.
- Click the Layout tab to switch to the Layout view. The PageLayout is centered around the same point as the MapControl, and the graphic elements from the Map view are visible in the Layout view.
- Use the Pan tool in the PageLayout view, then switch back to the Map view. Once again, the map is centered around the same point as the Layout view.
frmMain.cs | Implementation file of the application main form hosting the MapControl and the PageLayoutControl. |
Maps.cs | Implementation class of the IMaps interface that is needed for synchronization. |
OpenNewMapDocument.cs | Command that allows you to open existing map documents. |
ControlsSynchronizer.cs | Class responsible for synchronizing the MapControl and the PageLayoutControl. |
frmMain.vb | Implementation file of the application main form hosting the MapControl and the PageLayoutControl. |
Maps.vb | Implementation class of the IMaps interface that is needed for synchronization. |
OpenNewMapDocument.vb | Command that allows you to open existing map documents. |
ControlsSynchronizer.vb | Class responsible for synchronizing the MapControl and the PageLayoutControl. |
Download the files for all languages
See Also:
How to create a MapControl applicationWalkthrough: Building a map viewing application using the ArcGIS Engine controls
Sample: Load a map document into the PageLayoutControl
Sample: Printing with the PageLayoutControl
Working with map elements
How to drop data onto the MapControl
Development licensing | Deployment licensing |
---|---|
Engine Developer Kit | Engine |
ArcGIS for Desktop Basic | |
ArcGIS for Desktop Standard | |
ArcGIS for Desktop Advanced |