2

I'm creating a symbol hatch:

var lineFill = new LineFillSymbolClass
{
    Angle = 45,
    Offset = 0,
    Separation = 0.1,
    Outline = new SimpleLineSymbolClass { Style = esriSimpleLineStyle.esriSLSSolid, Color = Color.FromArgb(215, 15, 245).ToRgbColorClass(), Width = 0.5 },
    LineSymbol = new SimpleLineSymbolClass { Style = esriSimpleLineStyle.esriSLSSolid, Color = Color.FromArgb(215, 152, 245).ToRgbColorClass(), Width = 0.5 }
};
((IGeoFeatureLayer)featureLayer).Renderer = new SimpleRendererClass { Symbol = lineFill };

Instead of hatch, makes the background simple fill. What am I doing wrong?

enter image description here

  • I think you need to be using LineFillSymbol you are using SimpleLineSymbol. – Hornbydd Feb 13 '17 at 13:07
  • The question is solved! – ILya Kuzmin Feb 14 '17 at 5:14
  • The property LineSymbol, need to use - new SimpleLineSymbolClass { Style = esriSimpleLineStyle.esriSLSSolid, Color = Color.FromArgb(215, 152, 245).ToRgbColorClass(), Width = 0.5 }. And assign the property Separation = 1 ... N – ILya Kuzmin Feb 14 '17 at 5:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.