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.
- Open and compile the sample project in Visual Studio. Set up a debug application if needed.
- Open ArcMap, ArcScene, or ArcGlobe. The custom layer property page works in all of these applications since it is registered in the appropriate layer property page component categories.
- Add a layer to the application.
- Display the layer context menu by right-clicking the layer and selecting Properties. The Properties dialog box appears.
- Activate the custom property page by clicking the Layer Visibility (C#) or Layer Visibility (VB.NET) tab.
- The visibility is controlled by two radio buttons on the page. Toggle visibility to enable the Apply button in the dialog box.
- Click the Apply or OK button to commit the change. The TOC and display are refreshed to reflect the change you made with the custom property page.
- Close the Properties dialog box.
- Click the Customize menu, and click Customize Mode. The Customize dialog box appears.
- Click the Toolbars tab and select Context Menus.
- Expand and scroll down to Feature Layer Context Menu, and click to expand the menu.
- Click the Commands tab, and drag and drop the Simple Layer Properties (C#) or Simple Layer Properties (VB.NET) command from the .NET Samples category onto the Feature Layer Context Menu.
- Close the dialog box.
- Click the Simple Layer Properties command you just added. The layer context menu displays. The simplified Properties dialog box only shows the Layer Visibility and Symbology pages.
- If necessary, clean up to remove the custom command by resetting the Feature Layer Context Menu in the Customize dialog box.
|LayerVisibilityPage.cs||User control implementing a custom property page for layer visibility.|
|SimpleLayerPropertiesCmd.cs||Command displaying a simplified layer property sheet.|
Download the files for all languages
|Development licensing||Deployment licensing|
|ArcGIS for Desktop Basic||ArcGIS for Desktop Basic|
|ArcGIS for Desktop Standard||ArcGIS for Desktop Standard|
|ArcGIS for Desktop Advanced||ArcGIS for Desktop Advanced|