ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / GraduatedSymbolsRendererDefinition Class / MaximumSymbolSize Property
Example

In This Topic
    MaximumSymbolSize Property (GraduatedSymbolsRendererDefinition)
    In This Topic
    Gets or sets the maximum symbol size. The default value is 18.0.
    Syntax
    public double MaximumSymbolSize {get; set;}
    Public Property MaximumSymbolSize As Double
    Example
    Class Breaks renderer with graduated symbols.
    /// <summary>
    /// Renders a feature layer using graduated symbols and natural breaks to draw quantities.
    /// ![cb-symbols.png](https://ArcGIS.github.io/arcgis-pro-sdk/images/Renderers/cb-symbols.png "Graduated symbols with natural breaks 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 == "USDemographics");
      if (featureLayer == null)
      {
        MessageBox.Show("This renderer works with the USDemographics feature layer available with the ArcGIS Pro SDK Sample data", "Data missing");
      }
      GraduatedSymbolsRendererDefinition gsDef = new GraduatedSymbolsRendererDefinition()
      {
        ClassificationField = "NumericFieldInFeatureLayer", //getting the first numeric field
        ClassificationMethod = ClassificationMethod.NaturalBreaks,
        SymbolTemplate = SymbolFactory.Instance.ConstructPointSymbol(CIMColor.CreateRGBColor(76, 230, 0)).MakeSymbolReference(),
        MinimumSymbolSize = 4,
        MaximumSymbolSize = 50,
        BreakCount = 5,
        ColorRamp = colorRamp, //getting a color ramp
      };
      await QueuedTask.Run(() =>
      {
        CIMClassBreaksRenderer renderer = (CIMClassBreaksRenderer)featureLayer.CreateRenderer(gsDef);
        featureLayer?.SetRenderer(renderer);
      });
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also