ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / Layout Class / CanSendBackward Method / CanSendBackward(Element) Method
The element to check
Example Version

CanSendBackward(Element) Method
Checks whether the given element can be moved back within its parent's element collection. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public bool CanSendBackward( 
   Element element
)

Parameters

element
The element to check

Return Value

True if the element can be moved back.
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 bottom of its parent's element collection, false is returned. False can also be returned if the element's z order cannot be checked (e.g. an element does not belong to the page layout, etc.).
Example
Ordering: Send backward and Bring forward
//On the QueuedTask
//get the current selection set
var sel_elems = layout.GetSelectedElements();
//can they be brought forward? This will also check that all elements have the same parent
if (layout.CanBringForward(sel_elems))
{
  //bring forward
  layout.BringForward(sel_elems);
  //bring to front (of parent)
  //graphicsLayer.BringToFront(sel_elems);
}
else if (layout.CanSendBackward(sel_elems))
{
  //send back
  layout.SendBackward(sel_elems);
  //send to the back (of parent)
  //graphicsLayer.SendToBack(sel_elems);
}
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also