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

ILegendItem2 Interface

Provides access to members that control how a layer appears in a legend. Can be stored in a style. Note: the ILegendItem2 interface has been superseded byILegendItem3. Please consider using the more recent version.

Product Availability

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

Members

Name Description
Read-only property CanDisplay Indicates if the style is compatible with the specified layer.
Method ChangeFlowDirection Indicates if a legend's flow direction changes. Update alignment settings.
Read/write property Columns Number of columns in the legend item.
Method CreateGraphics Rebuilds the list of graphics. Call whenever the associated layer changes.
Read-only property Graphics List of graphics that represent the legend item. Must call CreateGraphics first.
Read/write property GroupIndex Zero-based index of the legend group shown by this item. Use -1 to show all legend groups using this item.
Read/write property HeadingSymbol Text symbol used to draw the heading.
Read-only property Height Height of the item in points. Must call CreateGraphics first.
Read/write property KeepTogether Indicates if classes must appear in a single column or whether they can be split across multiple columns.
Read/write property Layer Associated layer.
Read/write property LayerNameSymbol Text symbol used to draw the layer name.
Read/write property LegendClassFormat Default formatting information for the legend classes. Renderer may override.
Read-only property Name Name of the style.
Read/write property NewColumn Indicates if the item starts a new column in the legend.
Read/write property ShowDescriptions Indicates if descriptions are visible.
Read/write property ShowHeading Indicates if heading is visibile.
Read/write property ShowLabels Indicates if labels are visible.
Read/write property ShowLayerName Indicates if layer name is visibile.
Read-only property Width Width of the item in points. Must call CreateGraphics first.

CoClasses that implement ILegendItem2

CoClasses and Classes Description
HorizontalBarLegendItem Horizontal bar legend item.
HorizontalLegendItem Horizontal legend item.
NestedLegendItem Nested legend item.
VerticalLegendItem Vertical legend item.