I have a layer with streets and I'm trying to change the color of the streets. I know I asked a similar question, How do I change the colors of my layer file?, and the answer worked for points.
This is my attempt at getting it to work with a street layer.
IFeatureRenderer featureRenderer = geolayer.Renderer; int streetFeatureID = geolayer.FeatureClass.FindField("STREET"); IFeature feature = geolayer.FeatureClass.GetFeature(streetFeatureID); ISymbol symbol = featureRenderer.get_SymbolByFeature(feature); ILineSymbol linesymbol = symbol as ILineSymbol; linesymbol.Color = SymbolCreator.getColor(255, 0, 0); /*my method which creates an RgbColor*/
This seems like it should work - there are no nulls or errors - but I'm missing a way to set the symbol.
I'd like something like this:
Since I can't find that method I think I must be doing something completely wrong. Thanks in advance. Using ArcEngine 10 C# VS2010