protected override void OnRender(swm.DrawingContext dc) { base.OnRender(dc); if (!Handler.tiled) { var rect = new sw.Rect(0, 0, this.ActualWidth, this.ActualHeight); var graphics = new Graphics(Handler.Widget.Generator, new GraphicsHandler(this, dc, rect, false)); Handler.Widget.OnPaint(new PaintEventArgs(graphics, rect.ToEto())); } }
protected override void OnRender(swm.DrawingContext dc) { base.OnRender(dc); if (!Handler.tiled) { var rect = new sw.Rect(0, 0, ActualWidth, ActualHeight); var cliprect = rect.ToEto(); if (!cliprect.IsEmpty) { using (var graphics = new Graphics(new GraphicsHandler(this, dc, rect, new RectangleF(Handler.ClientSize), false))) { Handler.Callback.OnPaint(Handler.Widget, new PaintEventArgs(graphics, cliprect)); } } } }