ArcGIS Pro 2.6 API Reference Guide
SetRenderer(CIMRenderer) Method

ArcGIS.Desktop.Mapping Namespace > FeatureLayer Class > SetRenderer Method : SetRenderer(CIMRenderer) Method
Your custom renderer that will be used to draw features of the feature layer.
Specifies the feature layer's renderer object which determines how the layer draws. This method must be called on the MCT. Use QueuedTask.Run
Syntax
public void SetRenderer( 
   CIMRenderer updatedRenderer
)
Public Overloads Sub SetRenderer( _
   ByVal updatedRenderer As CIMRenderer _
) 

Parameters

updatedRenderer
Your custom renderer that will be used to draw features of the feature layer.
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Renderer cannot be of type CIMHeatMapRenderer
Renderer cannot be of type CIMDotDensityRenderer
Remarks
Use FeatureLayer.CreateRenderer to create a new renderer.
If the feature layer is a member of a SubtypeGroupLayer, the renderer argument passed cannot be of type CIMHeatMapRenderer or you will get a System.ArgumentException. If the feature layer is a member of a SubtypeGroupLayer and is in the 3D category of the table of contents in a 3D view, the renderer argument passed cannot be of type CIMDotDensityRenderer or you will get a System.ArgumentException. Use the IsSubtypeLayer property to determine if the feature layer is a member of a SubtypeGroupLayer. Use the SceneLayerType property to determine if the feature layer is in 3D category of the table of contents.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

FeatureLayer Class
FeatureLayer Members
Overload List