ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / IElement Interface / SetCustomProperties Method
The collection of custom properties
Version

SetCustomProperties Method (IElement)
Sets multiple CustomProperty values for the element. This method must be called on the MCT. Use QueuedTask.Run.
Syntax

Parameters

customProperties
The collection of custom properties
Exceptions
ExceptionDescription
This method must be called within the lambda passed to QueuedTask.Run.
Remarks
This method was created so developers have a way to uniquely assign a value or multiple values to an element that can not be changed in the UI and therefore provides a predictable way to find an element. You can overwrite values simply be reentering the same key with a different value in the input collection. There are no methods to remove keys.
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also