Click or drag to resize
GraphicCollection Class
An observable collection of Graphic.
Inheritance Hierarchy
SystemObject
  System.Collections.ObjectModelCollectionGraphic
    System.Collections.ObjectModelObservableCollectionGraphic
      Esri.ArcGISRuntime.LayersGraphicCollection

Namespace: Esri.ArcGISRuntime.Layers
Assembly: Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 10.2.7.0 (10.2.7.1234)
Syntax
public class GraphicCollection : ObservableCollection<Graphic>

The GraphicCollection type exposes the following members.

Constructors
  NameDescription
Public methodGraphicCollection
Initializes a new instance of the GraphicCollection class.
Public methodGraphicCollection(IEnumerableGraphic)
Initializes a new instance of the GraphicCollection class and populates it with items copied from the specified collection.
Top
Methods
  NameDescription
Public methodAdd (Inherited from CollectionGraphic.)
Public methodAddRange
Adds graphic items to the end of the collection.
Protected methodBlockReentrancy
Disallows reentrant attempts to change this collection.
(Inherited from ObservableCollectionGraphic.)
Protected methodCheckReentrancy
Checks for reentrant attempts to change this collection.
(Inherited from ObservableCollectionGraphic.)
Public methodClear (Inherited from CollectionGraphic.)
Protected methodClearItems
Clears the items.
(Overrides ObservableCollectionTClearItems.)
Public methodContains (Inherited from CollectionGraphic.)
Public methodCopyTo (Inherited from CollectionGraphic.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetEnumerator (Inherited from CollectionGraphic.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf (Inherited from CollectionGraphic.)
Public methodInsert (Inherited from CollectionGraphic.)
Protected methodInsertItem
Inserts the item.
(Overrides ObservableCollectionTInsertItem(Int32, T).)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMove
Moves the item at the specified index to a new location in the collection.
(Inherited from ObservableCollectionGraphic.)
Protected methodMoveItem
Moves the item.
(Overrides ObservableCollectionTMoveItem(Int32, Int32).)
Protected methodOnCollectionChanged
Raises the CollectionChanged event with the provided arguments.
(Inherited from ObservableCollectionGraphic.)
Protected methodOnPropertyChanged
Raises the PropertyChanged event with the provided arguments.
(Inherited from ObservableCollectionGraphic.)
Public methodRemove (Inherited from CollectionGraphic.)
Public methodRemoveAt (Inherited from CollectionGraphic.)
Protected methodRemoveItem
Removes the item.
(Overrides ObservableCollectionTRemoveItem(Int32).)
Protected methodSetItem
Sets the item.
(Overrides ObservableCollectionTSetItem(Int32, T).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyCount (Inherited from CollectionGraphic.)
Public propertyIsReadOnly
If true, will throw InvalidOperationException when trying to modify the collection.
Public propertyItem
Gets or sets the element at the specified index.
(Inherited from CollectionGraphic.)
Protected propertyItems (Inherited from CollectionGraphic.)
Top
Events
  NameDescription
Public eventCollectionChanged
Occurs when an item is added, removed, changed, moved, or the entire list is refreshed.
(Inherited from ObservableCollectionGraphic.)
Protected eventPropertyChanged
Occurs when a property value changes.
(Inherited from ObservableCollectionGraphic.)
Top
See Also
Supported Platforms
This type is supported on the following ArcGIS Runtime .NET SDK platforms:
Windows Desktop
Windows Phone
Windows Store
Additional Examples
Hyperlink to ExampleDescription
Camera_SetMethodsDemonstrates navigating/animating between MapPoint Graphics with a Camera. Simultaneous changes of X, Y, Z, Pitch, and Heading during the animation is shown.
Editor_SketchingDemonstrates sketching various geometric shapes on the map via the Editor.RequestShapeAsync method. The sketches are then added as Graphics in a GraphicsLayer and drawn on the map.
EditorConfigurationDemonstrates sketching Polyline shapes on the map via the Editor.RequestShapeAsync method. The sketches are then added as Graphics in a GraphicsLayer and drawn on the map. Multiple versions of customizing the symbology of the Editor are shown.
EqualGeometriesDemonstrates the differences in comparing a few polygon geometries to via the Geometry.IsEqual and GeometryEngine.Equals Methods.
FindTaskDemonstrates using the Query.FindTask operation to search for text in attribute fields of an ArcGIS Server map service and display the features found as graphics in a GraphicsLayer.
GeocodeFullAddressInputDemonstrates performing a geocode by submitting values for multiple address fields.
GeocodeSingleLineInputPerforms a single line geocode using either an online ArcGIS Locator service or a local Locator.
GeometryEngine_BufferDemonstrates using the powerful GeometryEngine local process to generate graphic buffer polygons based upon a user specified radius and mouse-clicks/taps on the map.
GeometryEngine_BufferWithUnionDemonstrates using the powerful GeometryEngine local process to generate a single graphic buffer (unioned) based upon multiple points provided by user interaction with the map.
GeometryEngine_ConvexHullDemonstrates using the powerful GeometryEngine local process to generate a convex hull graphic polygon based upon user specified mouse-clicks/taps on the map.
GeometryEngine_Difference_Intersection_UnionDemonstrates using the powerful GeometryEngine local process to perform the spatial analysis operations of Difference, Intersection, and Union on two input geometries.
GeometryEngine_TestingSpatialRelationshipsDemonstrates using the powerful GeometryEngine local process to test various spatial relationships (Contains, Crosses, Disjoint, Equals, Intersects, Overlaps, Touches, Within) between two input geometries.
GetAreaAllows the user to draw a polygon on the map and calculate the area via several methods.
GraphicsLayer_LabelingDemonstrates labeling city names where two AttributeLabelClass'es are used (one for smaller cities and one for larger ones).
GraphicsLayer_RenderingModeDemonstrates setting the various GraphicsLayer.RenderingMode options and their effect on TextSymbols when the MapView is rotated.
GraphicsLayerWindowDemonstrates various Graphics and GraphicsLayer related actions.
GraphicsOverlayDemonstrates using the Query.FindTask operation to return county features in an ArcGIS Server map service and display the features found as Graphics in a GraphicsOverlay. The user can perform a MapViewTapped on the Graphics to perform a GraphicsOverlay.HitTestAsync to select features and display attribute information.
IdentifyParameter_DynamicLayerInfosDemonstrates performing an Identify on a Dynamic Layer using the ESRI.ArcGISRuntime.Tasks.Query.IdentifyParameter.DynamicLayerInfos Property.
IdentifyTaskDemonstrates using the Query.IdentifyTask operation find a feature based upon it's geographic position in an ArcGIS Server map service and display it as a graphic in a GraphicsLayer.
PolygonBuilder_MakeIslandsShows how to use the PolygonBuilder to turn multiple independent Polygons into a single Polygon (use case: grouping island Polygons together into one record).
PolygonFromScratchDemonstrates creating a simple polygon, donut polygon, and multiple ring polygon via code-behind. An option to view coordinate information for each vertex in the polygons is provided.
ProximityResultDemonstrates identifying the nearest vertex and nearest coordinate in a polyline to a user clicked point in the map via ProximityResult.
RoutingPointToPointDemonstrates simple point to point routing between two input locations.
RoutingWithBarriersShows routing and re-routing around user defined point, polyline, and polygon barriers.
RoutingWithDirectionsInteraction logic for RoutingWithDirections.xaml
SmoothGraphicAnimationAnimates a graphic smoothly between two user defined locations by calling the MapPoint.MoveTo method at regular intervals as defined by a DispatcherTimer. The distance the point is moved each time is calculated by a quintic easing function.