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


IMapLayerInfo3.HasLabels Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IM > IMapLayerInfo3 Interface > IMapLayerInfo3.HasLabels Property
ArcGIS Developer Help

IMapLayerInfo3.HasLabels Property

Indicates if the layer has labels to turn on and off.

[Visual Basic .NET]
Public ReadOnly Property HasLabels As Boolean
[C#]
public bool HasLabels {get;}
[C++]
HRESULT get_HasLabels(
  Boolean* HasLabels
);
[C++]
Parameters
HasLabels [out, retval]

HasLabels is a parameter of type bool*

Product Availability

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

Remarks

HasLabels returns True only when the label of the layer is turned on in the source map document.

In case where the layer has label but is turned off in the source map document, MapServer returns False.

You may want to use label's scale visibility, when you do not want to draw label all the time. 

See Also

IMapLayerInfo3 Interface