ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / IElement Interface / GetCustomProperty Method
Example

In This Topic
    GetCustomProperty Method (IElement)
    In This Topic
    Gets a Custom Property value for the element.
    Syntax
    string GetCustomProperty( 
       string key
    )
    Function GetCustomProperty( _
       ByVal key As String _
    ) As String

    Parameters

    key

    Return Value

    Returns a string based on the key that is provided.
    Example
    Element_GetCustomProperty
    //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 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also