Name
PaintEventArgs
Synopsis
This class encapsulates the data used by the
Control.Paint event, raised when the
Control needs repainting.
You can retrieve the System.Drawing.Graphics
surface on which to draw and the ClipRectangle
that needs repainting (to optimize your paint function).
Information about repaint is also included under
Control and ControlStyles.
public class PaintEventArgs : EventArgs : IDisposable { // Public Constructors public PaintEventArgs(System.Drawing.Graphics graphics, System.Drawing.Rectangle clipRect); // Public Instance Properties public Rectangle ClipRectangle{get; } public Graphics Graphics{get; } // Public Instance Methods public void Dispose(); // implements IDisposable // Protected Instance Methods protected virtual void Dispose(bool disposing); protected override void Finalize(); // overrides object }
Hierarchy
System.Object
→ System.EventArgs → PaintEventArgs(System.IDisposable)
Passed To
Control.{InvokePaint(),
InvokePaintBackground(),
OnPaintBackground(), RaisePaintEvent()},
System.Windows.Forms.Design.ComponentTray.OnPaint(),
System.Windows.Forms.Design.ControlDesigner.OnPaintAdornments(), PaintEventHandler.{BeginInvoke(),
Invoke()}
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access