ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TinContourRendererDefinition Class / Label Property
Example

In This Topic
    Label Property (TinContourRendererDefinition)
    In This Topic
    Gets or sets the label that will show up on the TOC next to the symbol.
    Syntax
    Public Property Label As String
    public string Label {get; set;}
    Example
    Contour Renderer
    {
      var contourDef = new TinContourRendererDefinition();
    
      // now customize with a symbol
      contourDef.Label = "Contours";
      contourDef.SymbolTemplate = contourLineSymbol.MakeSymbolReference();
      contourDef.ContourInterval = 6;
    
      contourDef.IndexLabel = "Index Contours";
      contourDef.IndexSymbolTemplate = indexLineSymbol.MakeSymbolReference();
      contourDef.ContourFactor = 4;
      contourDef.ReferenceHeight = 7;
      // Note: Needs QueuedTask to run
      {
        if (surfaceLayer.CanCreateRenderer(contourDef))
        {
          CIMTinRenderer renderer = surfaceLayer.CreateRenderer(contourDef);
          if (surfaceLayer.CanSetRenderer(renderer, SurfaceRendererTarget.Contours))
            surfaceLayer.SetRenderer(renderer, SurfaceRendererTarget.Contours);
        }
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.2 or higher.
    See Also