ArcGIS Pro 2.4 API Reference Guide
GetCustomProperty Method
Example 

ArcGIS.Desktop.Layouts Namespace > Element Class : GetCustomProperty Method
Gets a Custom Property value for the element.
Syntax
Public Function GetCustomProperty( _
   ByVal key As String _
) As String
public string GetCustomProperty( 
   string key
)

Parameters

key

Return Value

Returns a string based on the key that is provided.
Example
//Get a custom property that has been previously set.

//Perform on the worker thread
await QueuedTask.Run(() =>
{
  String custProp = element.GetCustomProperty("MyKeyString");
});
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

Element Class
Element Members