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 that defines the appearance of label text (such as 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
Target | Versions |
---|---|
.NET Standard 2.0 | 100.11 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.11 - 200.6 |
Xamarin.Android | 100.11 - 100.15 |
Xamarin.iOS | 100.11 - 100.15 |
UWP | 100.11 - 200.6 |