Class TextSymbol
Defines how text is displayed using characteristics such as font, size, color, and position.
Implements
Namespace: Esri.ArcGISRuntime.Symbology
Assembly: Esri.ArcGISRuntime.dll
Syntax
[Bindable]
public class TextSymbol : MarkerSymbol, INotifyPropertyChanged
Remarks
To display text in a MapView or SceneView, create a TextSymbol. Specify whether a string or attribute value is displayed by the Text. Define the appearance and position of the text using Color, Size, FontStyle, or VerticalAlignment, for example. Position the text by applying it to a Graphic based on any type of geometry - point, multipoint, polyline, or polygon. Add the graphic to the Graphics collection and add the GraphicsOverlay to the MapView or SceneView collection of graphics overlays.
TextSymbol is also used to define the appearance of layer and grid based labels:
- Layers such as FeatureLayer, ArcGISSceneLayer, or DynamicEntityLayer contain label definitions that specify how labels are displayed. You can use TextSymbol to define a label appearance within a scale range. To display these labels, add a collection of these label definitions to a layer.
- MapView can display a coordinate system grid with specific label styles at different resolutions. You can define the appearance of these labels using SetTextSymbol(Int64, Symbol).
Constructors
Name | Description |
---|---|
TextSymbol() | Initializes a new instance of the TextSymbol class with default values. |
TextSymbol(String, Color, Double, HorizontalAlignment, VerticalAlignment) | Initializes a new instance of the TextSymbol class. |
Properties
Name | Description |
---|---|
BackgroundColor | Gets or sets the color for the text symbol background. |
Color | Gets or sets the color for the text symbol. |
FontDecoration | Gets or sets the type of font decoration for the text symbol. |
FontFamily | Gets or sets the font family of the text symbol. |
FontStyle | Gets or sets the font style of the text symbol. |
FontWeight | Gets or sets the font weight of the text symbol. |
HaloColor | Gets or sets the halo color for the text symbol. |
HaloWidth | Gets or sets the size of the halo around the text symbol in device-independent pixels (DIPs). |
HorizontalAlignment | Gets or sets the horizontal alignment of the text symbol relative to the symbol's mid-point. |
KerningEnabled | Gets or sets a value indicating whether to adjust the spacing between individual characters in the text. |
OutlineColor | Gets or sets the outline color for the text symbol. |
OutlineWidth | Gets or sets the width of the text symbol outline in device-independent pixels (DIPs). |
Size | Gets or sets the font size of the text symbol. |
Text | Gets or sets the text of the text symbol. |
VerticalAlignment | Gets or sets the vertical alignment of the text symbol relative to the symbol's mid-point location. |
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.5 |
.NET | 100.13 - 200.5 |
.NET Windows | 100.13 - 200.5 |
.NET Android | 200.0 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.0 - 200.5 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.5 |