ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / GraphicsLayerExtensions Class / CanBringForward Method / CanBringForward(GraphicsLayer,Element) Method
The element to check

In This Topic
    CanBringForward(GraphicsLayer,Element) Method
    In This Topic
    Checks whether the given element can be moved forward within its parent's element collection. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public static bool CanBringForward( 
       GraphicsLayer graphicsLayer,
       Element element
    )
    Public Overloads Shared Function CanBringForward( _
       ByVal graphicsLayer As GraphicsLayer, _
       ByVal element As Element _
    ) As Boolean

    Parameters

    graphicsLayer
    element
    The element to check

    Return Value

    True if the element can be moved forward.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Value cannot be null: element
    Remarks
    Element z order is relative to the element collection within their parent. The bottom element has a z order of 0. The top element has a z order of N - 1. If the element is already at the top 0 false is returned. False can also be returned if the element's z order cannot be checked (i.e. the element is not a graphic element, a group element, does not belong to the graphics layer, etc.).
    The map view displaying the graphics layer should be initialized.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also