ArcGIS Pro 3.6 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / FeatureLayer Class / SetFeatureDrawOrder Method / SetFeatureDrawOrder(String,SortOrderType) Method
The name of the field to use for drawing order. Cannot be null
The sort direction

In This Topic
    SetFeatureDrawOrder(String,SortOrderType) Method
    In This Topic
    Set the layer feature drawing order. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void SetFeatureDrawOrder( 
       string fieldName,
       SortOrderType sortDirection
    )
    Public Overloads Sub SetFeatureDrawOrder( _
       ByVal fieldName As String, _
       ByVal sortDirection As SortOrderType _
    ) 

    Parameters

    fieldName
    The name of the field to use for drawing order. Cannot be null
    sortDirection
    The sort direction
    Exceptions
    ExceptionDescription
    'field name' cannot be null or empty
    "Invalid drawing order inputs -check field name(s) exist and/or are the correct field type"
    Layer does not support feature drawing order
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    Any existing drawing order will be overwritten. Internally, GetCanSetFeatureDrawOrder(String,SortOrderType) is called to determine if the provided field can be used.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.6 or higher.
    See Also