/// <summary>
        /// Create graphic object for Frame
        /// </summary>
        /// <param name="spatialReferenceID">Map spatial reference ID</param>
        /// <returns>Graphic object for Frame</returns>
        public static FrameGraphicObject Create(int?spatialReferenceID)
        {
            // TODO: Remove hardcode
            Color color = Color.FromArgb(100, 180, 180, 255);

            SimpleFillSymbol simpleFillSymbol = new SimpleFillSymbol()
            {
                BorderThickness = 2,
                BorderBrush     = new System.Windows.Media.SolidColorBrush(Colors.Green),
                Fill            = new System.Windows.Media.SolidColorBrush(color)
            };

            FrameGraphicObject graphic = new FrameGraphicObject(spatialReferenceID)
            {
                Symbol   = simpleFillSymbol,
                Geometry = null
            };

            return(graphic);
        }
        /// <summary>
        /// Show selection frame.
        /// </summary>
        /// <param name="startPoint">Selection frame start point.</param>
        public void ShowSelectionFrame(ESRI.ArcGIS.Client.Geometry.MapPoint startPoint)
        {
            Debug.Assert(startPoint != null);
            Debug.Assert(_mapControl != null);

            _selectionFrame = FrameGraphicObject.Create(_mapControl.Map.SpatialReferenceID);
            SelectionFrameLayer.Graphics.Add(_selectionFrame);

            _selectionFrame.Start = new ESRI.ArcLogistics.Geometry.Point(startPoint.X, startPoint.Y);
        }
        /// <summary>
        /// Finish selecting by selection frame.
        /// </summary>
        /// <param name="endPoint">Selection frame end point.</param>
        public void FinishSelectByFrame(ESRI.ArcGIS.Client.Geometry.MapPoint endPoint)
        {
            Debug.Assert(endPoint != null);
            Debug.Assert(_mapControl != null);

            if (_selectionFrame != null)
            {
                SelectionFrameLayer.Graphics.Clear();

                _selectionFrame.End = new ESRI.ArcLogistics.Geometry.Point(endPoint.X, endPoint.Y);
                _SelectInFrame();

                _mapControl.UpdateLayout();

                _selectionFrame = null;
            }
        }
        /// <summary>
        /// Cancel selection by selection frame.
        /// </summary>
        public void HideSelectionFrame()
        {
            Debug.Assert(SelectionFrameLayer != null);

            if (_selectionFrame != null)
            {
                SelectionFrameLayer.Graphics.Clear();
                _selectionFrame = null;
            }
        }
        /// <summary>
        /// Create graphic object for Frame
        /// </summary>
        /// <param name="spatialReferenceID">Map spatial reference ID</param>
        /// <returns>Graphic object for Frame</returns>
        public static FrameGraphicObject Create(int? spatialReferenceID)
        {
            // TODO: Remove hardcode
            Color color = Color.FromArgb(100, 180, 180, 255);

            SimpleFillSymbol simpleFillSymbol = new SimpleFillSymbol()
            {
                BorderThickness = 2,
                BorderBrush = new System.Windows.Media.SolidColorBrush(Colors.Green),
                Fill = new System.Windows.Media.SolidColorBrush(color)
            };

            FrameGraphicObject graphic = new FrameGraphicObject(spatialReferenceID)
            {
                Symbol = simpleFillSymbol,
                Geometry = null
            };

            return graphic;
        }