ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Layer Class / IsVisible Property
Example

In This Topic
    IsVisible Property (Layer)
    In This Topic
    Gets the layer's visibility state
    Syntax
    public bool IsVisible {get;}
    Public ReadOnly Property IsVisible As Boolean
    Example
    Change layer visibility, editability, snappability
    if (!layer.IsVisible)
      layer.SetVisibility(true);
    
    if (layer is FeatureLayer featureLayer)
    {
      if (!featureLayer.IsEditable)
        featureLayer.SetEditable(true);
    
      if (!featureLayer.IsSnappable)
        featureLayer.SetSnappable(true);
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also