ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / FeatureLayer Class / ClearFeatureDrawOrder Method
Example

In This Topic
    ClearFeatureDrawOrder Method
    In This Topic
    Clear the existing feature drawing order. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Sub ClearFeatureDrawOrder() 
    public void ClearFeatureDrawOrder()
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    Will throw a System.InvalidOperationException if drawing order is not supported on the layer
    Example
    Clear the Current Feature Drawing Order
    {
        //Within QueuedTask.Run()
        if (featureLayer.GetIsFeatureDrawOrderSupported())
        {
            //will throw an InvalidOperation exception if the layer does
            //not support FDO
            featureLayer.ClearFeatureDrawOrder();
            //Passing an empty or null list to 'SetFeatureDrawOrder()' will also clear the FDO
            featureLayer.SetFeatureDrawOrder(new List<CIMFeatureSortInfo>());
            //or
            featureLayer.SetFeatureDrawOrder(null);
        }
    }
    Requirements

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

    ArcGIS Pro version: 3.6 or higher.
    See Also