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


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

ILegendClass.Format Property

Optional. If non-null, then layer specifies class formatting information.

[Visual Basic .NET]
Public Property Format As ILegendClassFormat
[C#]
public ILegendClassFormat Format {get; set;}
[C++]
HRESULT get_Format(
  ILegendClassFormat** Format
);
[C++]
HRESULT put_Format(
  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.

Remarks

A layer or renderer can provide legend class formatting information via this property, which makes it possible to store legend formatting information with layers in metadata-like fashion. However this is not normally done. 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

ILegendClass Interface