ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / UnclassedColorsRendererDefinition Class / UpperColorStop Property
Example

In This Topic
    UpperColorStop Property
    In This Topic
    Gets or sets the upper color stop for the histogram used in the renderer.
    Syntax
    public Nullable<double> UpperColorStop {get; set;}
    Public Property UpperColorStop As Nullable(Of Double)
    Remarks
    Histogram stops can be edited to stretch or contract the color range. Any data outside of the two stops will be treated as outliers and drawn with either the minimum or maximum color.
    Example
    UnClassed graduated color renderer.
    /// <summary>
    /// Renders a feature layer using an unclassed color gradient.
    /// ![cb-unclassed.png](https://ArcGIS.github.io/arcgis-pro-sdk/images/Renderers/cb-unclassed.png "Class breaks unclassed renderer.")
    /// </summary>
    {
      //Check feature layer name
      //Code works with the USDemographics feature layer available with the ArcGIS Pro SDK Sample data
      var featureLayer = activeMap.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault(f => f.Name == "U.S. National Transportation Atlas Interstate Highways");
      if (featureLayer == null)
      {
        MessageBox.Show("This renderer works with the U.S. National Transportation Atlas Interstate Highways feature layer available with the ArcGIS Pro SDK Sample data", "Data missing");
      }
      //Gets the first numeric field of the feature layer
      var firstNumericFieldOfFeatureLayer = "NumericFieldInFeatureLayer";
      //Gets the min and max value of the field
      //Refer to the GetFieldMinMax function below
      var labels = await GetFieldMinMaxAsync(featureLayer, firstNumericFieldOfFeatureLayer);
      UnclassedColorsRendererDefinition ucDef = new UnclassedColorsRendererDefinition()
      {
        Field = firstNumericFieldOfFeatureLayer,
        ColorRamp = colorRamp,
        LowerColorStop = Convert.ToDouble(labels.Item1),
        UpperColorStop = Convert.ToDouble(labels.Item2),
        UpperLabel = labels.Item2,
        LowerLabel = labels.Item1,
      };
      await QueuedTask.Run(() =>
      {
        CIMClassBreaksRenderer renderer = (CIMClassBreaksRenderer)featureLayer.CreateRenderer(ucDef);
        featureLayer?.SetRenderer(renderer);
      });
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also