ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / LayerCreationParams Class / IsVisible Property
Example

IsVisible Property (LayerCreationParams)
Gets and sets layer visibility.
Syntax
public Nullable<bool> IsVisible {get; set;}
Example
Create a Scene Layer
var sceneLayerUrl = @"https://myportal.com/server/rest/services/Hosted/SceneLayerServiceName/SceneServer";
//portal items also ok as long as the portal is the current active portal...
//var sceneLayerUrl = @"https://myportal.com/home/item.html?id=123456789abcdef1234567890abcdef0";

await QueuedTask.Run(() =>
{
  //Create with initial visibility set to false. Add to current scene
  var createparams = new LayerCreationParams(new Uri(sceneLayerUrl, UriKind.Absolute))
  {
    IsVisible = false
  };

  //cast to specific type of scene layer being created - in this case FeatureSceneLayer
  var sceneLayer = LayerFactory.Instance.CreateLayer<Layer>(
           createparams, MapView.Active.Map) as FeatureSceneLayer;
  //or...specify the cast directly
  var sceneLayer2 = LayerFactory.Instance.CreateLayer<FeatureSceneLayer>(
           createparams, MapView.Active.Map);
  //ditto for BuildingSceneLayer, PointCloudSceneLayer, IntegratedMeshSceneLayer
  //...
});
      
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

ArcGIS Pro version: 2.4 or higher.
See Also