ComponentFactory.Krypton.Toolkit.KryptonPanelDesigner.DrawBorder C# (CSharp) Method

DrawBorder() private method

private DrawBorder ( Graphics graphics ) : void
graphics System.Drawing.Graphics
return void
        private void DrawBorder(Graphics graphics)
        {
            // Create a pen for drawing
            using (Pen borderPen = new Pen(SystemColors.ControlDarkDark))
            {
                // Always draw the border dashed
                borderPen.DashStyle = DashStyle.Dash;

                // Get the client rectangle
                Rectangle clientRect = Control.ClientRectangle;

                // Reduce by 1 in width and height
                clientRect.Width--;
                clientRect.Height--;

                // Perform actual draw
                graphics.DrawRectangle(borderPen, clientRect);
            }
        }