Modify legend format

This sample demonstrates how to use the Symbology control to modify the legend format to change AreaPatch and LinePatch symbols. This sample uses the Symbology control in conjunction with the PageLayout control, the Toolbar control, and the controls commands.

How to use

See How to use ArcGIS samples for help on running the sample.

  1. Start the ModifyLegendFormat application.
  2. Click Open to load a map document into the PageLayout control.
  3. Click the AddLegend button. A legend is added to the page layout. (To delete the legend, click the DeleteLegend button.)
  4. Click the ChangeAreaPatch button. A dialog box opens with area patch symbols.
  5. Select a symbol and click OK. The selected symbol is applied to the legend.
  6. Repeat steps 4 and 5 using the ChangeLinePatch button to change the line patch symbol.

If you installed the samples feature, you will find the files associated with this sample in <Your Developer Kit install location>\DeveloperKit10.4\Java\Samples\ArcObjects.

symbologybean/ Uses the Symbology control to change the legend format.

Development licensing Deployment licensing
Engine Developer Kit Engine
ArcGIS for Desktop Basic
ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced