ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / LayoutView Class / ClearElementSelection Method
Example

In This Topic
    ClearElementSelection Method (LayoutView)
    In This Topic
    Clear all layout elements in the layout view. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void ClearElementSelection()
    Public Sub ClearElementSelection() 
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    LayoutView_ClearSelection
    //Clear the layout's element selection.
    
    await QueuedTask.Run(() => layoutView.ClearElementSelection());
    
    Clear the selection in a layout view
    //If the a layout view is active, clear its selection
    LayoutView activeLayoutView = LayoutView.Active;
    if (activeLayoutView != null)
    {          
      activeLayoutView.ClearElementSelection();
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also