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


ILegendFormat Interface (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Carto)  

ILegendFormat Interface

Provides access to members that control formatting information for a legend.

Product Availability

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

Members

Description
Read/write property DefaultAreaPatch Area patch. Can be overridden by the LegendItem.
Read/write property DefaultLinePatch Line patch. Can be overridden by the LegendItem.
Read/write property DefaultPatchHeight Patch height in points. Can be overridden by the LegendItem.
Read/write property DefaultPatchWidth Patch width in points. Can be overridden by the LegendItem.
Read/write property GroupGap Vertical distance in points between legend groups.
Read/write property HeadingGap Vertical distance in points between a heading and the legend graphics that follow.
Read/write property HorizontalItemGap Horizontal distance in points between legend item columns. Used for legends that have more than one column.
Read/write property HorizontalPatchGap Horizontal distance in points between a patch and the legend graphics before and after.
Read/write property LayerNameGap Vertical distance in points between layer names and the legend graphics that follow.
Method Scale Multiply all distances, gaps, and size property values on this interface by the specified scale factors.
Read/write property ShowTitle Indicates if title is visibile.
Read/write property TextGap Horizontal distance in points between labels and descriptions.
Read/write property TitleGap Vertical distance in points between title and first legend item.
Read/write property TitlePosition Legend title position.
Read/write property TitleSymbol Text symbol used to draw the legend title.
Read/write property VerticalItemGap Vertical distance in points between legend items.
Read/write property VerticalPatchGap Vertical distance in points between patches.

CoClasses that implement ILegendFormat

CoClasses and Classes Description
LegendFormat A legend format.

Remarks

ILegendFormat controls general legend formatting.

Legend class formatting from a LegendClassFormat object can override some properties set through this interface (DefaultPatchWidth, DefaultPathHeight, DefaultLinePatch, DefaultAreaPatch).  The LegendClassFormat object comes from either the layer (ILegendClass.Format), or from the legend (ILegendItem.LegendClassFormat ).

For more on patches, see the help under IPatch.

The LegendFormat also manages the format of the legend's title. Set ShowTitle to False to hide the title. TitlePosition allows you to set on which side of the legend the title will be displayed.

The gap properties define the spacing between the different parts of the legend.

The Scale method is used to resize the legend.