A System.Web.UI.Design.ViewEventHandler delegate method compares the ViewEventArgs.EventType property to the static System.Web.UI.Design.ViewEvent fields to determine which type of action raised the event. A System.Web.UI.Design.ViewEvent object is equal to ViewEvent.Paint to indicate a paint event on the control on the design surface.
The System.Web.UI.Design.ControlDesigner class supplies a default System.Web.UI.Design.ViewEventHandler delegate. If the event type is ViewEvent.Paint, the delegate calls the ControlDesigner.OnPaint(System.Windows.Forms.PaintEventArgs) method. Classes deriving from the System.Web.UI.Design.ControlDesigner class override the ControlDesigner.OnPaint(System.Windows.Forms.PaintEventArgs) method to handle click events on a region at design time.