private void DrawSphere()
        {
            // create a new point (MapPoint); pass x, y, and z coordinates in the constructor
            var point = new MapPoint(-122.4167, 37.7833, 6000);

            // create a graphics layer
            GraphicsLayer graphicsLayer = new GraphicsLayer();

            graphicsLayer.ID = "Graphics Layer";
            graphicsLayer.SceneProperties.SurfacePlacement =
                SurfacePlacement.Absolute;
            graphicsLayer.InitializeAsync();

            // creates a red sphere with a radius of 20,000 meters
            var sphereSym = new SphereMarkerSymbol();

            sphereSym.Color = Colors.Red;

            sphereSym.Radius = 20000;

            // create the graphic
            var graphic = new Graphic(point, sphereSym);

            graphicsLayer.Graphics.Add(graphic);

            // add the graphics layers to the scene
            this.sceneView.Scene.Layers.Add(graphicsLayer);
        }
        public void OnPolygonWinOK(object parameter)
        {
            readytodrawPolygon = false;
            _graphicsOverlay   = tagView.GraphicsOverlays["drawGraphicsOverlay"];
            var tempgraphic = drawPolygonGraphic;

            _graphicsOverlay.Graphics.Remove(drawPolygonGraphic);

            SphereMarkerSymbol tagsymbol = App.Current.Resources["drawtoolPolygon"] as SphereMarkerSymbol;

            PolygonColor = parameter as SolidColorBrush;
            var Polygonsym = new SimpleFillSymbol();

            Polygonsym.Color = PolygonColor.Color;

            var sPointcollect = new Esri.ArcGISRuntime.Geometry.PointCollection();

            foreach (MapPoint tPoint in Polygonpointcollec)
            {
                MapPoint sPoint = new MapPoint(tPoint.X, tPoint.Y, drawPolygonZ);
                sPointcollect.Add(sPoint);
            }

            drawPolygonGraphic = new Graphic(new Polygon(sPointcollect), Polygonsym);
            drawPolygonGraphic.Attributes["Label"] = Polygongraphictext;
            _graphicsOverlay.Graphics.Add(drawPolygonGraphic);

            drawPolygonZ = 0;
            Polygonpointcollec.Clear();
            Polygonwinshowing = false;
            PolygonWin.Close();

            return;
        }
        public void OnLineWinOK(object parameter)
        {
            readytodrawLine  = false;
            _graphicsOverlay = tagView.GraphicsOverlays["drawGraphicsOverlay"];
            var tempgraphic = drawLineGraphic;

            _graphicsOverlay.Graphics.Remove(drawLineGraphic);

            SphereMarkerSymbol tagsymbol = App.Current.Resources["drawtoolLine"] as SphereMarkerSymbol;

            LineColor = parameter as SolidColorBrush;
            var linesym = new SimpleLineSymbol();

            linesym.Color = LineColor.Color;
            linesym.Width = linewidth;

            var sPointcollect = new Esri.ArcGISRuntime.Geometry.PointCollection();

            foreach (MapPoint tPoint in Linepointcollec)
            {
                MapPoint sPoint = new MapPoint(tPoint.X, tPoint.Y, drawLineZ);
                sPointcollect.Add(sPoint);
            }

            drawLineGraphic = new Graphic(new Polyline(sPointcollect), linesym);
            drawLineGraphic.Attributes["Label"] = Linegraphictext;
            _graphicsOverlay.Graphics.Add(drawLineGraphic);

            drawLineZ = 0;
            Linepointcollec.Clear();
            linewinshowing = false;
            LineWin.Close();

            return;
        }
        public void OnPointWinOK(object parameter)
        {
            _graphicsOverlay = tagView.GraphicsOverlays["drawGraphicsOverlay"];
            var tempgraphic = drawPointGraphic;

            _graphicsOverlay.Graphics.Remove(drawPointGraphic);

            SphereMarkerSymbol tagsymbol = App.Current.Resources["drawtoolpoint"] as SphereMarkerSymbol;

            pointColor      = parameter as SolidColorBrush;
            tagsymbol.Color = pointColor.Color;

            drawPointGraphic = new Graphic(new MapPoint(drawpointX, drawpointY, drawpointZ), tempgraphic.Attributes, tempgraphic.Symbol);
            drawPointGraphic.Attributes["Label"] = pointgraphictext;
            _graphicsOverlay.Graphics.Add(drawPointGraphic);
            drawPointGraphic = new Graphic();

            pointwinshowing = false;
            pointWin.Close();

            return;
        }
        private void DrawSphere()
        {
            // create a new point (MapPoint); pass x, y, and z coordinates in the constructor
            var point = new MapPoint(-122.4167, 37.7833,  6000);

            // create a graphics layer
            GraphicsLayer graphicsLayer = new GraphicsLayer();
            graphicsLayer.ID = "Graphics Layer";
            graphicsLayer.SceneProperties.SurfacePlacement =
                                SurfacePlacement.Absolute;
            graphicsLayer.InitializeAsync();

            // creates a red sphere with a radius of 20,000 meters
            var sphereSym = new SphereMarkerSymbol();
            sphereSym.Color = Colors.Red;

            sphereSym.Radius = 20000;

            // create the graphic
            var graphic = new Graphic(point, sphereSym);
           
            graphicsLayer.Graphics.Add(graphic);

            // add the graphics layers to the scene
            this.sceneView.Scene.Layers.Add(graphicsLayer);
        }