Managing custom feature renderers

In this topic

Applying custom feature renderers to a layer

Custom feature renderers are simple to manage and usually require the dynamic-link library (DLL) containing the renderer class to be registered on each client PC.
The following are the main methods for applying a custom feature renderer to a layer:
Applying through the Layer Properties dialog box (ArcGIS Desktop only)
Applying the renderer through the Layer Properties dialog box requires you to implement a custom renderer property page registered to the ESRI Renderer Property Pages component category.
Applying with ArcObjects code
Applying your custom renderer with ArcObjects code is the usual method when you have not implemented a custom renderer property page. The following code example creates a point dispersal renderer object, then replaces an existing renderer in a particular layer:
//geoFeatureLayer is an interface pointer to the IGeoFeatureLayer
//interface on a Feature Layer object.
//Create the custom renderer.
IDispersalRenderer myRenderer = new PointDispersalRenderer();
//You could set some properties here.
//Now set the custom renderer into the feature layer.
A custom renderer without an accompanying property page can be applied programmatically.
Applying with a feature class extension
The third way of applying a custom renderer to a layer is by writing a feature class extension. Your class extension must implement IFeatureClassExtension and IFeatureClassDraw.
To summarize, the globally unique identifier (GUID) of the FeatureClassExtension object is stored as an entry in the geodatabase. When the layer for this feature class draws, it looks to the feature class extension and uses the defined renderer (IFeatureClassDraw.CustomRenderer), which can be a custom renderer or one of the standard ESRI renderers. You can also associate a custom renderer property page through IFeatureClassDraw.CustomRendererPropertyPageCLSID. If you want to prevent users from changing the renderer, return true from IFeatureClassDraw.ExclusiveCustomRenderer.
Custom renderers can be applied by feature class extensions that implement IFeatureClassDraw.

See Also:

Custom feature renderers

Development licensingDeployment licensing
ArcGIS for Desktop BasicArcGIS for Desktop Basic
ArcGIS for Desktop StandardArcGIS for Desktop Standard
ArcGIS for Desktop AdvancedArcGIS for Desktop Advanced
Engine Developer KitEngine