combit List & Label 29 - .NET Help
combit.Reporting.Dom Namespace / ProjectBase Class / Layers Property
Example


In This Topic
    Layers Property
    In This Topic
    This collection contains the layers of the current project. It can also be used to add new layers to the project.
    Syntax
    'Declaration
     
    
    Public ReadOnly Property Layers As CollectionLayers
    public CollectionLayers Layers {get;}
    public:
    property CollectionLayers^ Layers {
       CollectionLayers^ get();
    }
    Example
    // Create new layer
    Layer layerNew = new Layer(proj.Layers); 
    layerNew.Name = "Layer01"; 
    layerNew.Condition = "Page() == 2"; 
     
    // Iterate all layers
    foreach (Layer layer in proj.Layers) 
    { 
        string layerName = layer.Name; 
        string layerCond = layer.Condition; 
    }
    Requirements

    Platforms: Windows 10 (Version 21H2 - 23H2), Windows 11 (21H2 - 22H2), Windows Server 2016 - 2022
    .NET: .NET Framework 4.8, .NET 6, .NET 7, .NET 8

    See Also