ahigh2

LineSymbol and SimpleLineSymbol not rendering without AcceleratedDisplay

Discussion created by ahigh2 on Apr 19, 2013
Latest reply on Jun 27, 2013 by MBranscomb-esristaff
Hello,

I'm working through some performance issues with the accelerated display and have switched to working without it enabled. 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.

Thanks.

EDIT: Code sample below

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);
}


And in the 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>

Outcomes