public void OnPaintItem(PaintEventArgs e, MenuBarItem item) { GraphicsHelper helper = new GraphicsHelper(e.Graphics); const int radius = 3; Rectangle bound = item.Bound; helper.RoundedGradient(UColor.Rgb(0x4d, 0x9f, 0xcf), UColor.Rgb(0x15, 0x69, 0x97), item.Bound, 90, radius); helper.Gradient(UColor.Blend(130, UColor.White), UColor.Blend(70, UColor.White), new Rectangle(item.Bound.X, item.Bound.Y + 1, 1, item.Bound.Height - radius), 90); helper.Gradient(UColor.Blend(130, UColor.White), UColor.Blend(70, UColor.White), new Rectangle(item.Bound.X + item.Bound.Width - radius + 2, item.Bound.Y + 1, 1, item.Bound.Height - radius), 90); helper.RoundedOutline(UColor.Rgb(0x18, 0x18, 0x18), item.Bound, radius); helper.Line(UColor.White, bound.X + radius, bound.Y + bound.Height - 1, bound.Width - radius, bound.Y + bound.Height-1); }
public Point GetNextItemLocation(MenuBarItem item) { int width = Items.Sum(it => it.Width); return new Point(FirstLocation.X + width, FirstLocation.Y); }
public void OnPaintItemText(PaintEventArgs e, MenuBarItem item) { }