This document is archived and information here might be outdated.  Recommended version.


ILegend2 Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IL > ILegend2 Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Carto)  

ILegend2 Interface

Provides access to additional members that control a legend.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Members

Name Description
Method AddItem Adds a new item to the legend (to the end of the list).
Method AdjustColumns Adjust the item settings so that the legend contains the specified number of columns.
Read/write property AutoAdd Indicates if a new item should be added when a new layer is added to the map.
Read/write property AutoReorder Indicates if the legend items should be kept in the same order as the layers.
Read/write property AutoVisibility Indicates if items should be shown only when associated layers are visible.
Method ClearItems Removes all items from the legend.
Read-only property DefaultLegendItem The default legend item for the specified layer.
Method DelayEvents Used to batch operations together to minimize notifications.
Method Draw Draws the map surround into the specified display bounds.
Method FitToBounds Adjusts the map surround to fit the bounds. The changed argument indicates whether the size of the map surround was changed.
Read/write property FlowRight Reserved for future use.
Read/write property Format The formatting options for the legend (can be stored in the style gallery).
Read-only property Icon Icon used to represent the map surround.
Method InsertItem Inserts a new item into the legend (at the location specified by index).
Read-only property Item The specified item from the legend.
Read-only property ItemCount Number of items in the legend.
Read/write property Map The parent map.
Read/write property Name Name of the map surround.
Method QueryBounds Returns the bounds of the map surround.
Method Refresh Makes sure the latest updates are refected the next time the Map Surround is drawn.
Method RemoveItem Removes the specified item from the legend.
Read/write property ScaleSymbols Indicates if symbols are scaled for the layer.
Read/write property Title Title.

CoClasses that implement ILegend2

CoClasses and Classes Description
Legend A map surround for displaying a legend.