ArcGIS Pro 2.7 API Reference Guide
GetLayersAsFlattenedList Method (ILayerContainer)

ArcGIS.Desktop.Mapping Namespace > ILayerContainer Interface : GetLayersAsFlattenedList Method
Returns a read only flat list of layers where nested groups are not preserved.
Syntax
IReadOnlyList<Layer> GetLayersAsFlattenedList()
Function GetLayersAsFlattenedList() As IReadOnlyList(Of Layer)

Return Value

A read only list of layers
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

ILayerContainer Interface
ILayerContainer Members