ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / Layout Class / UnSelectElements Method
The selected elements to unselect. If null then all elements are unselected.
Example

UnSelectElements Method (Layout)
Unselect the elements on the page layout.
Syntax
public void UnSelectElements( 
   IEnumerable<Element> elements
)

Parameters

elements
The selected elements to unselect. If null then all elements are unselected.
Exceptions
ExceptionDescription
elements must belong to layout 'URI'
Remarks
If a child of a group element is provided in the list of elements to be unselected in addition to its parent then the parent is the element unselected.
Example
UnSelect elements on the Layout
//Unselect one element.
var elementToUnSelect = layout.FindElements(new List<string>() { "MyPoint" }).FirstOrDefault();
layout.UnSelectElement(elementToUnSelect);
//Unselect multiple elements.
var elementsToUnSelect = layout.FindElements(new List<string>() { "Point 1", "Line 3", "Text 1" });
layout.UnSelectElements(elementsToUnSelect);
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

ArcGIS Pro version: 2.7 or higher.
See Also