FindElements Method (PresentationPage)
Finds the elements recursively with the given names in the presentation page.
Parameters
- elementNames
- The names of the elements to find. Cannot be null
Return Value
A
IList or an empty list if no elements are found
Element selection and navigation
//Must be on QueuedTask
await QueuedTask.Run(() =>
{
// Find specific elements by name
var ge_rect = page.FindElement("Rectangle") as GraphicElement;
var elements = new List<string>();
elements.Add("Text");
elements.Add("Polygon");
var elems = page.FindElements(elements);
//Get elements retaining hierarchy
var top_level_elems = page.GetElements();
//Flatten hierarchy
var all_elems = page.GetFlattenedElements();
//Use LINQ with any of the collections
//Retrieve just those elements that are Visible
var some_elems = all_elems.Where(ge => ge.IsVisible).ToList();
});
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3.5 or higher.