I modified one of the standard WPF samples (RenderSimpleMarkers) to create a line graphic instead of a point graphic e.g:
replaced:
Graphic graphicWithSymbol = new Graphic(centralLocation, simpleSymbol);
with:
Graphic graphicWithSymbol = CreateSimpleLine(), where CreateSimpleLine is the following procedure:
public static Graphic CreateSimpleLine()
{
MapPoint point1 = new MapPoint(-79.497238, 8.849289, SpatialReferences.Wgs84);
var newPoint1 = (MapPoint)GeometryEngine.Project(point1, SpatialReferences.WebMercator);
var cartoLineSym = new SimpleLineSymbol(SimpleLineSymbolStyle.Solid, Colors.Black, 1);
MapPoint point2 = new MapPoint(-80.035568, 9.432302, SpatialReferences.Wgs84);
var newPoint2 = (MapPoint)GeometryEngine.Project(point2, SpatialReferences.WebMercator);
var aBuilder = new PolylineBuilder(new MapPoint[] { newPoint1, newPoint2 });
var aGraphic = new Graphic(aBuilder.ToGeometry(), cartoLineSym);
return aGraphic;
}
If I change the SimpleLineSymbolStyle to other than solid everything works OK but with the solid pattern the program throws!