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


ILegendItem.LegendClassFormat Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IL > ILegendItem Interface > ILegendItem.LegendClassFormat Property
ArcGIS Developer Help

ILegendItem.LegendClassFormat Property

Default formatting information for the legend classes. Renderer may override.

[Visual Basic .NET]
Public Property LegendClassFormat As ILegendClassFormat
[C#]
public ILegendClassFormat LegendClassFormat {get; set;}
[C++]
HRESULT get_LegendClassFormat(
  ILegendClassFormat** Format
);
[C++]
HRESULT put_LegendClassFormat(
  ILegendClassFormat* Format
);
[C++]
Parameters
Format [out, retval]

Format is a parameter of type ILegendClassFormat** Format [in]
Format is a parameter of type ILegendClassFormat*

Product Availability

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

Description

The layer can provide legend class formatting information via ILegendClass.Format.  This makes it possible to store legend formatting information with layers in metadata-like fashion.  However, layers normally do not provide a LegendClassFormat object.  Rather, legend formatting information usually comes from the legend.  ILegendItem.LegendClassFormat is used and some patch settings can come from ILegend.LegendFormat .

So, when a legend is created, the code follows this logic:

  1. Check if ILegendClass.Format exists for the layer.  If not, use ILegendItem.LegendClassFormat.
  2. For the patch settings, if a setting in ILegendItem.LegendClassFormat is null, then use the default value in ILegend.LegendFormat.

See Also

ILegendItem Interface