ArcGIS Pro 2.7 API Reference Guide
GetElements Method (GraphicsLayerExtensions)

ArcGIS.Desktop.Mapping Namespace > GraphicsLayerExtensions Class : GetElements Method
The graphics layer being extended
Get the collection of elements from the GraphicsLayer. Nesting within ArcGIS.Desktop.Layouts.GroupElement is preserved.
Syntax
public static IReadOnlyList<Element> GetElements( 
   GraphicsLayer graphicsLayer
)
Public Shared Function GetElements( _
   ByVal graphicsLayer As GraphicsLayer _
) As IReadOnlyList(Of Element)

Parameters

graphicsLayer
The graphics layer being extended

Return Value

Remarks
Use GetElementsAsFlattenedList to flatten the collection otherwise enumerate any returned ArcGIS.Desktop.Layouts.GroupElement individually.
Elements are returned in Z order. The 0th Element is at the back or 'bottom' and the 'Nth' element is at the front or 'top'.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

GraphicsLayerExtensions Class
GraphicsLayerExtensions Members