ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / UniqueValueRendererDefinition Class / ValuesLimit Property
Example

In This Topic
    ValuesLimit Property
    In This Topic
    Gets or sets a limit on how many unique values will be retrieved from the table.
    Syntax
    public int ValuesLimit {get; set;}
    Public Property ValuesLimit As Integer
    Remarks
    You can pass 0 to retrieve all unique values. By default it is set to 100.
    When you set it to other than 0, you should set DefaultSymbol and UseDefaultSymbol so that you will miss any features from drawing.
    Example
    Defining a unique value renderer definition
    var uvrDef = new UniqueValueRendererDefinition()
    {
      ValueFields = new List<string> { "ACTYPE" },
      SymbolTemplate = SymbolFactory.Instance.ConstructPointSymbol(
        ColorFactory.Instance.RedRGB, 10, SimpleMarkerStyle.Hexagon)
          .MakeSymbolReference(),
      ValuesLimit = 5
    };
    //Note: CreateRenderer can only create value classes based on
    //the current events it has received
    streamLayer.SetRenderer(streamLayer.CreateRenderer(uvrDef));
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also