Class Graphic
Instances of this class represent graphics. Graphics can be displayed on the map through a GraphicsOverlay. Graphics can be used as input to a task, or they can be used to display output from a task, or in response to user interaction.
Implements
Namespace: Esri.ArcGISRuntime.UI
Assembly: Esri.ArcGISRuntime.dll
Syntax
public class Graphic : GeoElement, INotifyPropertyChanged
Remarks
Each graphic must contain a Geometry describing the location and the shape of the graphic.
A graphic can be associated with a Symbol which determines how the graphic looks. Alternatively, the GraphicsOverlay can be assigned a Renderer which determines the appearance of all graphics in the layer. Note, symbols associated with individual graphics take precedence over the symbols chosen by the renderer. The symbol used depends upon the geometry type associated with the graphic. A MarkerSymbol is used for MapPoint and Multipoint geometries, SimpleLineSymbol for Polyline geometries, and SimpleFillSymbol for Polygon geometries.
A graphic can contain a set of attributes (key-value pairs) providing more information about the graphic.
Constructors
Name | Description |
---|---|
Graphic() | Initializes a new instance of the Graphic class. |
Graphic(Geometry) | Initializes a new instance of the Graphic class and setting the geometry. |
Graphic(Geometry, Symbol) | Initializes a new instance of the Graphic class and setting the geometry and symbol. |
Graphic(Geometry, IEnumerable<KeyValuePair<String, Object>>) | Initializes a new instance of the Graphic class and setting the geometry. |
Graphic(Geometry, IEnumerable<KeyValuePair<String, Object>>, Symbol) | Initializes a new instance of the Graphic class and setting the geometry, attributes and symbol. |
Graphic(IEnumerable<KeyValuePair<String, Object>>) | Initializes a new instance of the Graphic class and setting the attributes. |
Properties
Name | Description |
---|---|
Geometry | Gets or sets the Geometry of this graphic. |
GraphicsOverlay | Gets the GraphicsOverlay that this Graphic is attached to. |
IsSelected | Gets or sets a value indicating whether this graphic is selected. |
IsVisible | Gets or sets a value indicating whether this graphic is rendered on a map. |
Symbol | Gets or sets the Symbol for this graphic. |
ZIndex | Gets or sets the draw order for graphics. Graphics with higher Z-index values are drawn on top of lower Z-index graphics. |
Name | Description |
---|---|
INotifyPropertyChanged.PropertyChanged | Occurs when a property value changes. |
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.0 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 100.15 |