public static void FillRectangle(Rectangle rect,Color color,XGraphics graphics) { var r = rect.ToXRect(); graphics.DrawRectangle(new XSolidBrush(ToXColor(color)),r); }