Provides access to members that control a legend. Note: the ILegend interface has been superseded byILegend2. Please consider using the more recent version.
Product Availability
Members
Description | ||
---|---|---|
AddItem | Adds a new item to the legend (to the end of the list). | |
AutoAdd | Indicates if a new item should be added when a new layer is added to the map. | |
AutoReorder | Indicates if the legend items should be kept in the same order as the layers. | |
AutoVisibility | Indicates if items should be shown only when associated layers are visible. | |
ClearItems | Removes all items from the legend. | |
DelayEvents | Used to batch operations together to minimize notifications. | |
Draw | Draws the map surround into the specified display bounds. | |
FitToBounds | Adjusts the map surround to fit the bounds. The changed argument indicates whether the size of the map surround was changed. | |
FlowRight | Reserved for future use. | |
Format | The formatting options for the legend (can be stored in the style gallery). | |
Icon | Icon used to represent the map surround. | |
InsertItem | Inserts a new item into the legend (at the location specified by index). | |
Item | The specified item from the legend. | |
ItemCount | Number of items in the legend. | |
Map | The parent map. | |
Name | Name of the map surround. | |
QueryBounds | Returns the bounds of the map surround. | |
Refresh | Makes sure the latest updates are refected the next time the Map Surround is drawn. | |
RemoveItem | Removes the specified item from the legend. | |
Title | Title. |
Inherited Interfaces
Interfaces | Description |
---|---|
IMapSurround | Provides access to members that control the map surround. |
CoClasses that implement ILegend
CoClasses and Classes | Description |
---|---|
Legend | A map surround for displaying a legend. |
Remarks
Use this interface to modify a legend and access its subparts.
A legend is mostly a collection of legend items, one for each layer of the map. See the ILegendItem documentation for information about these. ILegend provides access to and manages the legend’s items with the Item and ItemCount properties as well as the AddItem, InsertItem, RemoveItem and ClearItems methods.
The format of the legend is managed by the LegendFormat object. The Format properties gives access to this object through the ILegendFormat interface. ILegend also manages a few of the legend properties such as the Title . When changing the properties of an existing legend, you must call Refresh to have the changes reflected in the layout.
Finally the AutoAdd, AutoReorder and AutoVisibility properties are used to synchronize the aspect and ordering of the legend with the TOC. The default value for this property is True.