ArcGIS Pro 2.6 API Reference Guide
HeatMapRendererDefinition Class
Members  Example 

ArcGIS.Desktop.Mapping Namespace : HeatMapRendererDefinition Class
Represents a heat map renderer definition to draw point features as a density surface.
Object Model
HeatMapRendererDefinition ClassCIMColorRamp Class
Syntax
public class HeatMapRendererDefinition : RendererDefinition 
Public Class HeatMapRendererDefinition 
   Inherits RendererDefinition
Remarks

Once you define a heat map renderer, you can call a FeatureLayer's CreateRenderer and SetRenderer methods to create and assign a renderer to a point feature layer.

Only applicable for point feature layers.

Example
Create a heatmap renderer and set that to the selected feature layer of the active map.
string colorBrewerSchemesName = "ArcGIS Colors";
StyleProjectItem style = Project.Current.GetItems<StyleProjectItem>().First(s => s.Name == colorBrewerSchemesName);
string colorRampName = "Heat Map 4 - Semitransparent";
IList<ColorRampStyleItem> colorRampList = await QueuedTask.Run(() =>
{
    return style.SearchColorRamps(colorRampName);
});
ColorRampStyleItem colorRamp = colorRampList[0];

await QueuedTask.Run(() =>
{
    //defining a heatmap renderer that uses values from Population field as the weights
    HeatMapRendererDefinition heatMapDef = new HeatMapRendererDefinition()
    {
        Radius = 20,
        WeightField = "Population",
        ColorRamp = colorRamp.ColorRamp,
        RendereringQuality = 8,
        UpperLabel = "High Density",
        LowerLabel = "Low Density"
    };

    FeatureLayer flyr = MapView.Active.Map.Layers[0] as FeatureLayer;
    CIMHeatMapRenderer heatMapRndr = (CIMHeatMapRenderer)flyr.CreateRenderer(heatMapDef);
    flyr.SetRenderer(heatMapRndr);
});
Inheritance Hierarchy

System.Object
   ArcGIS.Desktop.Mapping.LayerDrawingDefinition
      ArcGIS.Desktop.Mapping.RendererDefinition
         ArcGIS.Desktop.Mapping.HeatMapRendererDefinition

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

HeatMapRendererDefinition Members
ArcGIS.Desktop.Mapping Namespace