public override void DrawRect(CGRect dirtyRect) { try { var c = NSGraphicsContext.CurrentContext.GraphicsPort; var g = new CoreGraphicsGraphics(c, true); var e = new CanvasDrawingEventArgs(g, Bounds.ToRectangleF()); Drawing(this, e); } catch (Exception ex) { Log.Error(ex); } }
public override void DrawRect(System.Drawing.RectangleF dirtyRect) { base.DrawRect(dirtyRect); var g = new CoreGraphicsGraphics(NSGraphicsContext.CurrentContext.GraphicsPort, true); var bounds = Bounds; _clock.Width = bounds.Width; _clock.Height = bounds.Height; _clock.Draw(g); }
public override void Draw(System.Drawing.RectangleF rect) { base.Draw(rect); var c = UIGraphics.GetCurrentContext(); var g = new CoreGraphicsGraphics(c, true); var bounds = Bounds; _clock.Width = bounds.Width; _clock.Height = bounds.Height; _clock.Draw(g); }