ArcReaderControl document properties


Purpose
This sample demonstrates how to use the IARControl.ShowARWindow method to display the FileProperties modal window when the Browse dialog box is used to select a document to load into the control. The DataFrame and Layer properties modal windows are displayed by right-clicking a map or layer in the table of contents (TOC) to display the context menu and selecting Properties. The IARControl.TOCVisible property is used to toggle the visibility of the TOC if the loaded document was published with permission to do so.
 
When the TOC is invisible, the DataFrame and Layer properties cannot be displayed manually. Instead, the IARPageLayout.ARMap property is used to iterate each map and obtain its Description, DistanceUnits, Name, and SpatialReferenceName properties. The IARMap.ARLayer property is used to iterate each layer in the map and obtain its Description, Name, MaximumScale, and MinimumScale properties. These properties are concatenated into a string, which is displayed in a RichTextBox.

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. Start Visual Studio, open the solution file, and build the project.
  2. Run the application.
  3. Browse to a Published Map File (PMF) from ArcMap to load.
  4. Display the file properties.
  5. Right-click a map in the TOC to display the data frame properties.
  6. Right-click a layer in the TOC to display the layer properties.
  7. Hide the TOC.
  8. Display the map and layer properties.

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

Download the files for all languages




Development licensing Deployment licensing
ArcView: Publisher ArcReader
ArcEditor: Publisher Engine Runtime
ArcInfo: Publisher ArcView
ArcEditor
ArcInfo