System.Web.UI.Design.ViewEventArgs Class

Provides data for the IControlDesignerView.ViewEvent event.

See Also: ViewEventArgs Members

Syntax

public class ViewEventArgs : EventArgs

Remarks

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:

For more information about events and delegates, see Events and Delegates.

Requirements

Namespace: System.Web.UI.Design
Assembly: System.Design (in System.Design.dll)
Assembly Versions: 2.0.0.0