ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / FeatureLayer Class / IsLabelVisible Property
Example

In This Topic
    IsLabelVisible Property (FeatureLayer)
    In This Topic
    Gets whether labels are drawing.
    Syntax
    Public ReadOnly Property IsLabelVisible As Boolean
    public bool IsLabelVisible {get;}
    Example
    Enable labeling on a layer
    {
        //Note: needs to be called on the MCT
        // toggle the label visibility
        featureLayer.SetLabelVisibility(!featureLayer.IsLabelVisible);
    }
    Enable labeling of a layer
    /// <summary>
    {
      // Note: call within QueuedTask.Run()
      {
        if (!featureLayer.IsLabelVisible)
          //set the label's visibility
          featureLayer.SetLabelVisibility(true);
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also