The PageLayoutControl corresponds to the layout view of the ArcMap desktop application and encapsulates the PageLayout object. Map documents authored with ArcMap can be loaded into the PageLayoutControl, eliminating the need to programmatically compose the cartography. See the following screen shot of the PageLayoutControl application:
Loading map documents
The map document can be set at design time through 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 on. 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 the map document.
Saving map documents
The PageLayoutControl can write map documents (*.mxd) as well as read them. The PageLayoutControl implements the IMxdContents interface that enables the MapDocument object to write the contents of the PageLayoutControl to a new map document. See the following code example:
Dim pMapDocument As IMapDocument
pMapDocument = New MapDocumentClass
pMapDocument.New("C:\Temp\myDocument.mxd")
pMapDocument.ReplaceContents(AxPageLayoutControl1.Object)
pMapDocument.SetActiveView(AxPageLayoutControl1.ActiveView)
pMapDocument.Save(True, True)
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.