Select to view content in your preferred language

Setting color to MultilayerSymbol possible bug

322
2
06-19-2024 04:44 AM
ofirrosner
Emerging Contributor

Im using Esri version 100.15.4

I have a MultiLayerSymbol that is built like this

ofirrosner_0-1718797096515.png


To Change the color i do the following:

 

private void Work(MultilayerSymbol symbol, Color color)
{
   symbol.color = color
   foreach(var symbolLayer in symbol.SymbolLayers)
   {
       if(!symbolLayer is VectorMarkerSymbolLayer vectorMarkerSymbolLayer)) continue;
foreach(var vectorMarkerSymbolElement in vectorMarkerSymbolLayer.VectorMarkerSymbolElements)
      {
           Work(vectorMarkerSymbolElement.Symbol, color)
      }
   }

}​

 

 

 

 

 

For some reason the Color property of SolidFillSymbolLayer isnt changing

P.S
event doing
symbol.Color = color; without the recursion yields the same result

 

2 Replies
PreetiMaske
Esri Regular Contributor

I am unable to reproduce the behavior. If you can share symbol's json I will be more than happy to look at it further.

0 Kudos
ofirrosner
Emerging Contributor

Sadly i cannot share
but i managed to solved => i used ArcGis 2.8 and created the symbols again from similar examples from app6

0 Kudos