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

In This Topic
    UnSelectElement Method (LayoutView)
    In This Topic
    Unselect the element within the layout view. This method must be called on the MCT. Use QueuedTask.Run.
    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
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    The layout view displaying the elements should be initialized.
    Example
    UnSelect elements on the LayoutView
    LayoutView layoutView = LayoutView.Active;
    //Unselect one element.
    var elementToUnSelectInView = layout.FindElements(new List<string>() { "MyPoint" }).FirstOrDefault();
    layoutView.UnSelectElement(elementToUnSelect);
    //Unselect multiple elements.
    var elementsToUnSelectInView = layout.FindElements(new List<string>() { "Point 1", "Line 3", "Text 1" });
    layoutView.UnSelectElements(elementsToUnSelect);
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also