protected override void OnPaint(PaintEventArgs e) { var helper = new GraphicsHelper(e.Graphics); var bounds = new Rectangle(0, 0, Width, Height); var shadowWidth = 20; switch (orientation) { case SideBarOrientation.Left: helper.Line(UColor.Blend(0x50, UColor.Black), Width - 1, 0, Width - 1, Height); helper.Gradient(UColor.Blend(0x20, UColor.Black), UColor.Transparent, new Rectangle(Width - shadowWidth, 0, shadowWidth, Height), 180); break; case SideBarOrientation.Right: helper.Line(UColor.Blend(0x50, UColor.Black), 0, 0, 0, Height); helper.Gradient(UColor.Blend(0x20, UColor.Black), UColor.Transparent, new Rectangle(0, 0, shadowWidth, Height), 0); break; } }
protected override void OnPaint(PaintEventArgs e) { var helper = new GraphicsHelper(e.Graphics); helper.Gradient(UColor.Blend(0x30, UColor.Black), UColor.Transparent, new Rectangle(0, 0, Width, Height/2), 90); helper.Line(UColor.Blend(0x60, UColor.Black), 0, 0, Width, 0); }
protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e) { var helper = new GraphicsHelper(e.Graphics); if (RenderBackground) { helper.Clear(UColor.White); helper.Gradient(UColor.Blend(0x05, UColor.Black), UColor.Blend(0x30, UColor.Black), e.AffectedBounds.Inflated(-1), 90); } }