ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TinSimpleRendererDefinition Class / Label Property
Example

In This Topic
    Label Property (TinSimpleRendererDefinition)
    In This Topic
    Gets or sets the label that will show up on the TOC next to the symbol.
    Syntax
    public string Label {get; set;}
    Public Property Label As String
    Example
    Simple Node Renderer
    // applies to TIN layers only
    
    var nodeRendererDef = new TinNodeRendererDefinition();
    nodeRendererDef.Description = "Nodes";
    nodeRendererDef.Label = "Nodes";
    nodeRendererDef.SymbolTemplate = nodeSymbol.MakeSymbolReference();
    
    var tinLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<TinLayer>().FirstOrDefault();
    if (tinLayer == null)
      return;
    
    if (tinLayer.CanCreateRenderer(nodeRendererDef))
    {
      CIMTinRenderer renderer = tinLayer.CreateRenderer(nodeRendererDef);
      if (tinLayer.CanSetRenderer(renderer, SurfaceRendererTarget.Points))
        tinLayer.SetRenderer(renderer, SurfaceRendererTarget.Points);
    }
    Simple Edge Renderer
    // applies to TIN or LAS dataset layers only
    
    var edgeRendererDef = new TinEdgeRendererDefintion();
    edgeRendererDef.Description = "Edges";
    edgeRendererDef.Label = "Edges";
    edgeRendererDef.SymbolTemplate = lineSymbol.MakeSymbolReference();
    
    if (surfaceLayer.CanCreateRenderer(edgeRendererDef))
    {
      CIMTinRenderer renderer = surfaceLayer.CreateRenderer(edgeRendererDef);
      if (surfaceLayer.CanSetRenderer(renderer, SurfaceRendererTarget.Edges))
        surfaceLayer.SetRenderer(renderer, SurfaceRendererTarget.Edges);
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also