ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / SimpleRendererDefinition Class
Members Example

In This Topic
    SimpleRendererDefinition Class
    In This Topic
    Represents simple renderer definition to draw all features in a layer with a common symbol.
    Object Model
    SimpleRendererDefinition ClassCIMSymbolReference Class
    public class SimpleRendererDefinition : RendererDefinition 
    Public Class SimpleRendererDefinition 
       Inherits RendererDefinition
    Once you define a simple renderer, you can call a FeatureLayer's CreateRenderer and SetRenderer methods to create and assign a renderer to a feature layer.
    Apply Symbology from a Layer in the TOC
    //Note: Call within QueuedTask.Run()
    if (MapView.Active.Map == null) return;
    //Get an existing Layer. This layer has a symbol you want to use in a new layer.
    var lyr = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>()
          .Where(l => l.ShapeType == esriGeometryType.esriGeometryPoint).FirstOrDefault();
    //This is the renderer to use in the new Layer
    var renderer = lyr.GetRenderer() as CIMSimpleRenderer;
    //Set the Dataconnection for the new layer
    Geodatabase geodatabase = new Geodatabase(
      new FileGeodatabaseConnectionPath(new Uri(@"E:\Data\Admin\AdminData.gdb")));
    FeatureClass featureClass = geodatabase.OpenDataset<FeatureClass>("Cities");
    var dataConnection = featureClass.GetDataConnection();
    //Create the definition for the new feature layer
    var featureLayerParams = new FeatureLayerCreationParams(dataConnection)
      RendererDefinition = new SimpleRendererDefinition(renderer.Symbol),
      IsVisible = true,
    //create the new layer
      featureLayerParams, MapView.Active.Map);
    Create a stream layer with a simple renderer
    var url = @"";
    var uri = new Uri(url, UriKind.Absolute);
    //Must be on QueuedTask!
    var createParams = new FeatureLayerCreationParams(uri)
      RendererDefinition = new SimpleRendererDefinition()
        SymbolTemplate = SymbolFactory.Instance.ConstructPointSymbol(
    var streamLayer = LayerFactory.Instance.CreateLayer<StreamLayer>(
                        createParams, map);
    Inheritance Hierarchy



    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also