Modify the appearance of the PageLayoutControl's page


PurposeThis sample demonstrates changing the border, background, color, and shadow effects of the PageLayoutControl's page using one, some, or all of the following interfaces: IPage, IFrameProperties, and IPropertySupport.

The Browse dialog box allows users to search and select map documents that are validated and loaded into the PageLayoutControl using the CheckMxFile and LoadMxFile methods. The visible extent of the PageLayout is set with the ZoomToWholePage method and the TrackRectangle and Pan methods in the OnMouseDown event to zoom in and pan the display.

The LoadStyleFile method and StyleClass property is used in the Form_Load event to display the contents of a SymbologyStyleClass (Borders, Backgrounds, Colors, and Shadows) from the ESRI.ServerStyle file into each of the SymbologyControls.

When a user double-clicks a symbol in a SymbologyControl, the GetSelectedItem method is used to get the selected symbol, which is applied to the PageLayoutControl's page in one of the following ways:
• Using the IPage Border, Background, and BackgroundColor properties
• Using the IFrameProperties Border, Background, and Shadow properties
• Using the IPropertySupport interface to see whether the symbol can be applied

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

How to use

See Using the samples for help on compiling, setting up the debugger, and running the sample (either an exe or dll).

  1. Browse and select a map document to load into the PageLayoutControl.
  2. Change the page border, background, color, and shadow properties, by double-clicking a symbol.

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

Download the files for all languages

See Also:

PageLayoutControl class
IPageLayoutControl interface
SymbologyControl class
ISymbologyControl interface