ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / Element Class / ZOrder Property
Example

In This Topic
    ZOrder Property (Element)
    In This Topic
    Gets the Z order of the element relative to its parent
    Syntax
    Public ReadOnly Property ZOrder As Integer
    public int ZOrder {get;}

    Property Value

    O based Z order index
    Remarks
    A z-order of 0 is equivalent to the bottom. A z-order equal to the number of child elements (minus 1) is equivalent to the top (relative to its parent.)
    Example
    Get Z-Order
    {
      var selElementsZOrder = layout.GetSelectedElements();
      //list out the z order
      foreach (var elem in selElementsZOrder)
        System.Diagnostics.Debug.WriteLine($"{elem.Name}: z-order {elem.ZOrder}");
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also