Provides data for the IControlDesignerView.ViewEvent event.
See Also: ViewEventArgs Members
The IControlDesignerView.ViewEvent event is raised by the designer host for certain actions on a control on the design surface. The IControlDesignerView.ViewEvent is handled by a System.Web.UI.Design.ViewEventHandler delegate method, which takes a System.Web.UI.Design.ViewEventArgs object as a parameter.
The System.Web.UI.Design.ControlDesigner class supplies a default delegate to handle the IControlDesignerView.ViewEvent. Custom control designers override the ControlDesigner.OnClick(DesignerRegionMouseEventArgs), ControlDesigner.OnPaint(System.Windows.Forms.PaintEventArgs), and TemplatedControlDesigner.OnTemplateModeChanged methods to process those events for the control on the design surface.
The designer host initializes a System.Web.UI.Design.ViewEventArgs object for the type of action on the design surface, and then passes the object to the System.Web.UI.Design.ViewEventHandler delegate. The ViewEventArgs.Region property represents the control designer region that the event applies to. The ViewEventArgs.EventType property of the System.Web.UI.Design.ViewEventArgs object indicates which type of action:
The ViewEventArgs.EventArgs property supplies the event arguments that are specific to the type of action.
For example, the designer host initializes System.Web.UI.Design.ViewEventArgs objects as follows:
A System.Web.UI.Design.DesignerRegionMouseEventArgs object when you click a region.
A System.Windows.Forms.PaintEventArgs object when a control is drawn on the design surface.
A System.Web.UI.Design.TemplateModeChangedEventArgs object when the template editing mode changes for the control on the design surface.
For more information about events and delegates, see Events and Delegates.