Select to view content in your preferred language

Setting color to MultilayerSymbol possible bug

132
2
a week ago
Labels (3)
ofirrosner
New Contributor III

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
New Contributor III

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