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 OnRenderToolStripBorder(ToolStripRenderEventArgs e) { var helper = new GraphicsHelper(e.Graphics); if (RenderBackground) { helper.Line(UColor.Blend(0x7a, UColor.Black), 0, e.AffectedBounds.Width, e.AffectedBounds.Height - 1); helper.Line(UColor.Blend(0xdd, UColor.White), 0, e.AffectedBounds.Width, e.AffectedBounds.Height - 2); } }
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 OnRenderSeparator(ToolStripSeparatorRenderEventArgs e) { var helper = new GraphicsHelper(e.Graphics); switch (e.Vertical) { case true: helper.Line(UColor.Blend(0x50, UColor.White), e.Item.Width/2 - 1, 0, e.Item.Width/2 - 1, e.Item.Height); helper.Line(UColor.Blend(0x60, UColor.Black), e.Item.Width/2, 0, e.Item.Width/2, e.Item.Height); helper.Line(UColor.Blend(0x50, UColor.White), e.Item.Width/2 + 1, 0, e.Item.Width/2 + 1, e.Item.Height); break; case false: helper.Line(UColor.Blend(0x50, UColor.Black), 0, e.Item.Height/2, e.Item.Width, e.Item.Height/2); helper.Line(UColor.Blend(0x80, UColor.White), 0, e.Item.Height/2 + 1, e.Item.Width, e.Item.Height/2 + 1); break; } }