Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

By some process I am creating a polygon feature layer. Before adding the layer in the map, I want to set polygon's fill color to no color and set polygon's outline color and width. I am working with C#.

Question:

Is there a way to set polygon feature layer's fill color or outline in ArcObject?

share|improve this question
    
do you want to set up a UniqueValue renderer, i.e. different symbols for all polygons or the same symbol for all polygons? –  Devdatta Tengshe Nov 22 '12 at 7:08
    
@Devdatta Tengshe: same symbol for all polygons –  Emi Nov 22 '12 at 7:10

1 Answer 1

up vote 3 down vote accepted

You need to set the renderer for your layer. Since you want to use the same symbology for all, you will have to use a ISimpleRenderer

Using an IFillSymbol, you can set the border and the color for your polygons. Set this as the symbol for your ISimpleRenderer and set that as the FetureRenderer on your IFeatureLayer.

Also have a look at this article: How to define a renderer for your layer

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.