Show / Hide Table of Contents

Constructor LabelDefinition

LabelDefinition(LabelExpression, TextSymbol)

Initializes a new instance of the LabelDefinition class with the specified LabelExpression and TextSymbol.

Declaration
public LabelDefinition(LabelExpression labelExpression, TextSymbol textSymbol)
Parameters
Type Name Description
LabelExpression labelExpression

The expression script used to calculate the label text.

TextSymbol textSymbol

The text symbol which describes the overall appearance of label text (e.g. font and size).

Remarks

The label expression may be a combination of literal text and attribute values from the feature being labeled. The syntax of the expression is determined by which label expression object is used: ArcadeLabelExpression, SimpleLabelExpression or WebmapLabelExpression. Warning: If the expression attempts to use attributes that don't exist, then labels will not be produced. This is distinct from the attribute existing but having a null or empty value, which can form part of the produced text label. Likewise, if no TextSymbol has been set, then no labels can be created.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.11 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.11 - 200.7
Xamarin.Android100.11 - 100.15
Xamarin.iOS100.11 - 100.15
UWP100.11 - 200.7
In This Article
Back to top Copyright © 2022 Esri.