I am overlaying different types of FillSymbols on my map depending on some values associated to the polygons. Below is how I set up my FillSymbols with LinearGradientBrushes to have a horizontal, diagnol, and vertical lines. I am looking for an example on how to create a FillSymbol that has the Vertical/Horizontal lines so it looks like a cross or checker board design. In the ArcGIS API for Flex it is a simple <esri:SimpleFillSymbol id="defaultFillSymbolCross" color="0x000000" alpha="1" style="cross">
<esri:SimpleLineSymbol color="0x000000" width="2" alpha="1" style="solid" />
</esri:SimpleFillSymbol>
Here is my code to create a Vertical and Horizontal: private LinearGradientBrush horizontal = new LinearGradientBrush()
{
StartPoint = new System.Windows.Point(0, 0),
EndPoint = new System.Windows.Point(0, 4),
MappingMode = System.Windows.Media.BrushMappingMode.Absolute,
SpreadMethod = System.Windows.Media.GradientSpreadMethod.Repeat,
};
private LinearGradientBrush vertical = new LinearGradientBrush()
{
StartPoint = new System.Windows.Point(0, 0),
EndPoint = new System.Windows.Point(4, 0),
MappingMode = System.Windows.Media.BrushMappingMode.Absolute,
SpreadMethod = System.Windows.Media.GradientSpreadMethod.Repeat,
};
FillSymbol model = new FillSymbol();
GradientStop transparent = new GradientStop();
transparent.Color = Colors.Transparent;
transparent.Offset = 0.8;
GradientStop black = new GradientStop();
black.Color = Colors.Black;
black.Offset = 0.8;
horizontal.GradientStops.Add(transparent);
horizontal.GradientStops.Add(black);
model.Fill = horizontal;
-- or --
vertical.GradientStops.Add(transparent);
vertical.GradientStops.Add(black);
model.Fill = vertical;