I've posted this over on ESRI's ArcGIS Runmtime for WPF forums but I thought I'd repost here to get some more developer exposure. Any input would be greatly appreciated. Original post here: http://forums.arcgis.com/threads/82721-LineSymbol-and-SimpleLineSymbol-not-rendering-without-AcceleratedDisplay
With the AcceleratedDisplay enabled, SimpleLineSymbols and LineSymbols both render correctly. If I turn it off, both fail to render completely. Nothing else has changed such as their geometries or symbologies. Is this a known issue and/or am I doing something wrong? Additionally, SimpleFillSymbols, PictureMarkerSymbols, and TextSymbols seem to work just fine regardless of AcceleratedDisplay settings. That is to say, if I render the symbols as SimpleFillSymbols they will show up (BorderBrush with no FillBrush).
Code Behind:
private void MakeSimpleSymbol()
{
//Create a simple line symbol
SimpleLineSymbol sls = new SimpleLineSymbol();
sls.Color = new SolidColorBrush(Colors.Blue);
sls.Style = SimpleLineSymbol.LineStyle.Solid;
sls.Width = 2;
//Create a polygon object
Polygon p = new Polygon();
p.SpatialReference = new SpatialReference(102100);
//Populate it with some points
ESRI.ArcGIS.Client.Geometry.PointCollection pointCollection = new ESRI.ArcGIS.Client.Geometry.PointCollection();
ObservableCollection<ESRI.ArcGIS.Client.Geometry.PointCollection> rings = new ObservableCollection<ESRI.ArcGIS.Client.Geometry.PointCollection>();
MapPoint wgsPoint = new MapPoint(0,0);
MapPoint wgsPoint2 = new MapPoint(50,0);
MapPoint wgsPoint3 = new MapPoint(0,50);
pointCollection.Add(wgsPoint);
pointCollection.Add(wgsPoint2);
pointCollection.Add(wgsPoint3);
rings.Add(pointCollection);
p.Rings = rings;
//Create a graphic and set its properties
Graphic graphic = new Graphic();
graphic.Geometry = p;
graphic.Symbol = sls;
//Create a graphics layer and add the graphic to it
GraphicsLayer gLayer = new GraphicsLayer();
gLayer.Graphics.Add(graphic);
//Add the graphics layer to the map
_map.Layers.Add(gLayer);
}
XAML:
<Window x:Class="ESRIWPFTestApplication.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:esri="http://schemas.esri.com/arcgis/client/2009"
Title="MainWindow" Height="350" Width="525">
<Grid>
<!-- AcceleratedDisplay is OFF -->
<esri:Map x:Name="_map" UseAcceleratedDisplay="False">
</esri:Map>
</Grid>
</Window>