IsVisibleInView(MapView) Method
Determines whether the layer is visible in the given map view
Check if Layer is visible in the given map view
var mapView = MapView.Active;
var layer = mapView.Map.GetLayersAsFlattenedList().OfType<Layer>().FirstOrDefault();
if (mapView == null) return;
bool isLayerVisibleInView = layer.IsVisibleInView(mapView);
if (isLayerVisibleInView)
{
//Do Something
}
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.