ArcGIS Pro 2.9 API Reference Guide
BringToFront(GraphicsLayer,Element) Method

ArcGIS.Desktop.Mapping Namespace > GraphicsLayerExtensions Class > BringToFront Method : BringToFront(GraphicsLayer,Element) Method
The element to bring to the front
Bring the element to the front of its parent's element collection. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public static void BringToFront( 
   GraphicsLayer graphicsLayer,
   Element element
)
Public Overloads Shared Sub BringToFront( _
   ByVal graphicsLayer As GraphicsLayer, _
   ByVal element As Element _
) 

Parameters

graphicsLayer
element
The element to bring to the front
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Value cannot be null: element
elements must belong to graphicsLayer
Remarks
Refer to CanBringForward(GraphicsLayer,Element) to check whether an element can be brought forward. Element z order can only be changed relative to its parent's element collection. The top element will have a z order of N - 1 where N is equal to the number of elements within the element parent's element collection. Check z order with ArcGIS.Desktop.Layouts.Element.GetZOrder.
The map view displaying the graphics layer should be initialized.
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

GraphicsLayerExtensions Class
GraphicsLayerExtensions Members
Overload List