ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMDisplayTable Class / DisplayField Property
Example

In This Topic
    DisplayField Property (CIMDisplayTable)
    In This Topic
    Gets or sets the name of the attribute field that will be used as a label that represents each row in the layer or table. The display field must be able to be represented as a string (string or numeric).
    Syntax
    Public Property DisplayField As String
    public string DisplayField {get; set;}
    Example
    Access the display field for a layer
    {
        // get the CIM definition from the layer
        // Note: needs to be called on the MCT
        var cimFeatureDefinition = featureLayer.GetDefinition() as ArcGIS.Core.CIM.CIMBasicFeatureLayer;
        // get the view of the source table underlying the layer
        var cimDisplayTable = cimFeatureDefinition.FeatureTable;
        // this field is used as the 'label' to represent the row
        var displayField = cimDisplayTable.DisplayField;
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also