ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / Layout Class / UnSelectElement Method
The selected element to unselect. Cannot be null.
Example

In This Topic
    UnSelectElement Method (Layout)
    In This Topic
    Unselect the element on the page layout.
    Syntax
    public void UnSelectElement( 
       Element element
    )
    Public Sub UnSelectElement( _
       ByVal element As Element _
    ) 

    Parameters

    element
    The selected element to unselect. Cannot be null.
    Exceptions
    ExceptionDescription
    Value cannot be null: element
    elements must belong to layout 'URI'.
    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

    ArcGIS Pro version: 3 or higher.
    See Also