Using the PageLayoutControl


The PageLayoutControl corresponds to the "layout" view of the ArcMap desktop application and encapsulates the PageLayout object. Map documents authored with the ArcMap application can be loaded into the PageLayoutControl eliminating the need to programmatically compose the cartography.

Loading map documents

The map document can be set at design-time though the PageLayoutControl property pages (in development environments that support property page capability) and the PageLayoutControl can be set to "link" or "contain" the map document. When linking, the PageLayoutControl will read the map document whenever the PageLayoutControl is created on the container and display the most recent updates to the map document. When containing, the PageLayoutControl will copy the contents of the map document into the PageLayoutControl and will not display any further updates made to the map document from that point onwards. Containing increases the size of the application executable containing the PageLayoutControl.
Alternatively, a map document can be loaded into the PageLayoutControl programmatically using the CheckMxFile method to determine whether the document is valid and the LoadMxFile method to load in the map document.

Saving map documents

As well as reading map documents, the PageLayoutControl can also write map documents (*.mxd). The PageLayoutControl implements the IMxdContents interface that enables the MapDocument object to write the contents of the PageLayoutControl to a new map document.

Elements

The PageLayoutControl provides shortcuts to frequently used members such as the GraphicsContainer, and AddElement, and helper methods such as FindElementByName and LocateFrontElement to manage individual elements in the PageLayout.

Printing

The PageLayoutControl provides shortcuts to frequently used members on the PageLayout object such as Page and Printer, and helper members such as PrinterPageCount and PrintPageLayout to assist with printing tasks.






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