protected override void OnDraw(Xwt.Drawing.Context cr, Rectangle rect) { if (BorderVisible) { { cr.SetLineWidth(1); var alloc = rect; var right = alloc.RightInside(); var bottom = alloc.BottomInside(); cr.SharpLineX(alloc.X, alloc.Y, alloc.X, bottom); cr.SharpLineX(right, alloc.Y, right, bottom); cr.SharpLineY(alloc.X, alloc.Y, right, alloc.Y); cr.SharpLineY(alloc.X, bottom, right, bottom); cr.SetColor(Colors.Gray); cr.Stroke(); } } }