ArcGIS Pro 3.7 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 Sub ClearElementSelection() 
    public void ClearElementSelection()
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Clear the selection in a layout view
    {
      //If the a layout view is active, clear its selection
      LayoutView activeLayoutView = LayoutView.Active;
      activeLayoutView?.ClearElementSelection();
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also