ESRI.ArcGIS.ADF.IMS
LabelField Property
See Also 
ESRI.ArcGIS.ADF.IMS.Display.Renderer Namespace > LabelRenderer Class : LabelField Property




Gets or sets the field that contains the text for labeling features.

Syntax

Visual Basic (Declaration) 
Public Property LabelField As String
Visual Basic (Usage)Copy Code
Dim instance As LabelRenderer
Dim value As String
 
instance.LabelField = value
 
value = instance.LabelField
C# 
public string LabelField {get; set;}

Example

For an example of using this property, see the SimpleLabelRenderer overview.

Remarks

The label field can be in the layer table or in a joined table. Performance is generally better if the field name is all upper case.

  • For shapefiles with no joined tables, the field can be referenced using the short format: LabelField="AREA".
  • For shapefiles with joined tables, the name of the joined table must be included along with the field names: LabelField="JOINEDTABLE.CITY".
  • For ArcSDE layers without joined tables, the short format can be used: LabelField="CITY". The fully qualified name can also be used: LabelField="ARCSDENAME.TABLE.CITY".
  • For ArcSDE layers with joined tables, the fully qualified format must be used: LabelField="ARCSDENAME.TABLE.CITY".

Multiple Fields in Labels

Labels can include data concatenated from two or more fields. Each field name is separated by a space.

  • For example, using a shapefile with no joined tables: LabelField="CITY STATE_NAME".

This property is required for all label renderers. If not set, a runtime error will occur with the message: "AXLParser: 'label' not found in VALUEMAPLABELRENDERER".

See Also

© 2010 All Rights Reserved.