private void DrawDragDockingSquaresLeft(Graphics g,
Color activeColor,
Color inactiveColor,
RenderDragDockingData dragData)
{
Color borderColour = ControlPaint.Dark(activeColor);
// Draw border around the window square
using (Pen borderPen = new Pen(borderColour),
dashPen = new Pen(borderColour),
shadow1Pen = new Pen(_190),
shadow2Pen = new Pen(_218))
{
// Draw the caption area at top of window
using (LinearGradientBrush middleBrush = new LinearGradientBrush(new Rectangle(4, 33, 23, 1), ControlPaint.LightLight(inactiveColor), activeColor, 0f),
bottomBrush = new LinearGradientBrush(new Rectangle(4, 34, 23, 1), ControlPaint.Light(activeColor), activeColor, 0f),
positionBrush = new LinearGradientBrush(new Rectangle(4, 35, 11, 1), Color.FromArgb(160, inactiveColor), Color.FromArgb(64, inactiveColor), 0f),
arrowBrush = new LinearGradientBrush(new Rectangle(18, 40, 5, 8), borderColour, Color.FromArgb(175, borderColour), 0f))
{
// Draw border
g.DrawLine(borderPen, 4, 33, 4, 53);
g.DrawLine(borderPen, 27, 33, 27, 53);
g.DrawLine(borderPen, 4, 53, 27, 53);
g.DrawLine(borderPen, 4, 33, 27, 33);
// Draw shadows around right and bottom edges
g.DrawLine(shadow1Pen, 5, 54, 28, 54);
g.DrawLine(shadow1Pen, 28, 34, 28, 54);
g.DrawLine(shadow2Pen, 6, 55, 29, 55);
g.DrawLine(shadow2Pen, 29, 35, 29, 55);
// Draw the caption area
g.FillRectangle(middleBrush, 5, 34, 22, 1);
g.FillRectangle(bottomBrush, 5, 35, 22, 1);
// Draw client area
g.FillRectangle(SystemBrushes.Window, 5, 36, 22, 17);
// Draw docking edge indicator
g.FillRectangle(positionBrush, 5, 36, 11, 17);
// Draw a dashed line down the middle
dashPen.DashStyle = DashStyle.Dot;
g.DrawLine(dashPen, 15, 37, 15, 52);
// Draw the direction arrow
g.FillPolygon(arrowBrush, new Point[] { new Point(19, 44), new Point(23, 40), new Point(23, 48), new Point(19, 44) });
// If active, then draw highlighted border
if (dragData.ActiveLeft)
{
g.DrawLine(borderPen, 0, 29, 23, 29);
g.DrawLine(borderPen, 0, 57, 23, 57);
g.DrawLine(borderPen, 0, 29, 0, 57);
}
}
}
}