DekGenius.com
[ Team LiB ] Previous Section Next Section

PaintEventArgsdisposable

System.Windows.Forms (system.windows.forms.dll)class

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()}

    [ Team LiB ] Previous Section Next Section