ArcGIS Pro 2.6 API Reference Guide
UnSelectElement Method

ArcGIS.Desktop.Mapping Namespace > GraphicsLayerExtensions Class : UnSelectElement Method
The element to unselect. Cannot be null
Unselect the element within the GraphicsLayer collection. This method must be called on the MCT. Use QueuedTask.Run
Syntax
public static void UnSelectElement( 
   GraphicsLayer graphicsLayer,
   Element element
)
Public Shared Sub UnSelectElement( _
   ByVal graphicsLayer As GraphicsLayer, _
   ByVal element As Element _
) 

Parameters

graphicsLayer
element
The element to unselect. Cannot be null
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
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.
Note: a child element will not be selected if its parent is already selected so passing in a child element in addition to its parent would have no effect on the selection state of the child regardless.
The map view displaying the graphics layer should be initialized.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

GraphicsLayerExtensions Class
GraphicsLayerExtensions Members