public MapLegend(MapBox map)
        {
            this.MapBox = map;
            IsVisible   = true;

            Top    = 50;
            Left   = 50;
            Height = 80;
            Width  = 150;

            var sizer = ImageCache.GetImage("pack://application:,,,/BioLink.Client.Maps;component/images/SizeHandle.png");

            _sizeHandle = GraphicsUtils.ImageFromBitmapSource(sizer);

            TitleColor = Color.Black;

            MapBox.MouseMove += new Maps.MapBox.MouseEventHandler(MapBox_MouseMove);
            MapBox.MouseDown += new Maps.MapBox.MouseEventHandler(MapBox_MouseDown);

            ReadFromSettings();
        }
        void MapBox_MouseMove(SharpMap.Geometries.Point WorldPos, System.Windows.Forms.MouseEventArgs ImagePos)
        {
            if (IsMouseInLegendBox(ImagePos))
            {
                _hasCursor = true;
                if (IsMouseInResizeBox(ImagePos))
                {
                    MapBox.Cursor = Cursors.SizeNWSE;
                }
                else
                {
                    MapBox.Cursor = Cursors.Hand;
                }
            }
            else
            {
                if (_hasCursor)
                {
                    MapBox.SetCursor();
                    _hasCursor = false;
                }
            }

            if (ImagePos.Button == MouseButtons.Left && _downPoint.HasValue)
            {
                var dx = _downPoint.Value.X - ImagePos.X;
                var dy = _downPoint.Value.Y - ImagePos.Y;

                if (IsMouseInResizeBox(_downPoint.Value))
                {
                    Width  -= dx;
                    Height -= dy;
                }
                else
                {
                    Top  -= dy;
                    Left -= dx;
                }

                if (Top < 0)
                {
                    Top = 0;
                }

                if (Left < 0)
                {
                    Left = 0;
                }

                if (Left > MapBox.Width - Width)
                {
                    Left = MapBox.Width - Width;
                }

                if (Top > MapBox.Height - Height)
                {
                    Top = MapBox.Height - Height;
                }

                _downPoint = new Point(ImagePos.X, ImagePos.Y);

                MapBox.Refresh();
            }
        }