ArcGISWindowsPhoneSDK.AddGraphics.AddPolygonGraphics C# (CSharp) Method

AddPolygonGraphics() private method

private AddPolygonGraphics ( ) : void
return void
        private void AddPolygonGraphics()
        {
            string coordinateString1 = "14819406,1294088 13066124,751406 13191358,2880391 15570812,2713412 14819406,1294088";

            GraphicsLayer graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;

            PointCollectionConverter pointConverter = new PointCollectionConverter();
            ESRI.ArcGIS.Client.Geometry.PointCollection pointCollection1 =
                pointConverter.ConvertFromString(coordinateString1) as ESRI.ArcGIS.Client.Geometry.PointCollection;

            ESRI.ArcGIS.Client.Geometry.Polygon polygon1 = new ESRI.ArcGIS.Client.Geometry.Polygon();
            polygon1.Rings.Add(pointCollection1);

            Graphic graphic = new Graphic()
            {
                Geometry = polygon1,
                Symbol = DefaultFillSymbol
            };

            graphicsLayer.Graphics.Add(graphic);
        }