ArcGIS Pro 2.9 API Reference Guide
FindElement Method (GraphicElementContainer)

ArcGIS.Desktop.Layouts Namespace > GraphicElementContainer Class : FindElement Method
The name of the element to find. Cannot be null
Finds the element recursively with the given name. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public Element FindElement( 
   string elementName
)
Public Function FindElement( _
   ByVal elementName As String _
) As Element

Parameters

elementName
The name of the element to find. Cannot be null

Return Value

The Element or null if it is not found
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Value cannot be null: elementName
Remarks
Find recurses nested groups to find the given element.
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

GraphicElementContainer Class
GraphicElementContainer Members