private static Bitmap GetRoundRectangleBitmap(Control panel)
        {
            Bitmap panelBitmap = new Bitmap(panel.Width - 1, panel.Height - 1);

            using (Graphics g = Graphics.FromImage(panelBitmap))
            {
                g.SmoothingMode = SmoothingMode.HighQuality;
                Rectangle    drawingRectangle = new Rectangle(0, 0, panelBitmap.Width, panelBitmap.Height);
                GraphicsPath path             = MapSuiteSampleHelper.CreateRoundPath(drawingRectangle, 10);
                g.DrawPath(new Pen(Color.LightGray, 1), path);
            }
            return(panelBitmap);
        }
        private bool ApplyBingMapsKey()
        {
            bool   cancel      = false;
            string bingMapsKey = MapSuiteSampleHelper.GetBingMapsKey();

            if (!string.IsNullOrEmpty(bingMapsKey))
            {
                foreach (BingMapsOverlay bingOverlay in MapControl.Overlays.OfType <BingMapsOverlay>())
                {
                    bingOverlay.ApplicationId = bingMapsKey;
                }
            }
            else
            {
                cancel = true;
            }

            return(cancel);
        }