ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / GroupLayer Class / AddSymbolLayerDrawing Method
Example

In This Topic
    AddSymbolLayerDrawing Method (GroupLayer)
    In This Topic
    Add Symbol Layer Drawing, SLD, to the group layer. After adding SLD it will be enabled. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void AddSymbolLayerDrawing()
    Public Sub AddSymbolLayerDrawing() 
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    SLD cannot be added to this layer
    Remarks
    Use CanAddSymbolLayerDrawing to determine if the group layer can have SLD added. If SLD cannot be added an System.InvalidOperationException will be thrown.
    Note: Adding SLD to a group layer will set any feature layers within the group that already had SLD added back to their default settings.
    Example
    Add SLD
    QueuedTask.Run(() =>
    {
      //check if it can be added to the layer
      if (featLayer.CanAddSymbolLayerDrawing())
        featLayer.AddSymbolLayerDrawing();
    
      //ditto for a group layer...must have at least
      //one child feature layer that can participate
      if (groupLayer.CanAddSymbolLayerDrawing())
        groupLayer.AddSymbolLayerDrawing();
    });
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also