System.Web.UI.Design.ViewEvent Class

Represents the kind of event that has occurred on a view of a control at design time. This class cannot be inherited.

See Also: ViewEvent Members

Syntax

public sealed class ViewEvent

Remarks

A System.Web.UI.Design.ViewEvent object is provided to the designer component by the design host, for example vsprvslong, when raising an event caused by certain user actions on the design-time view of a control. The IControlDesignerView.ViewEvent event is handled by a System.Web.UI.Design.ViewEventHandler delegate method, which takes a System.Web.UI.Design.ViewEventArgs object as a parameter. The ViewEventArgs.EventType property of the System.Web.UI.Design.ViewEventArgs class is a System.Web.UI.Design.ViewEvent object. The 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. For example, an event is raised under the following circumstances:

The System.Web.UI.Design.ControlDesigner class supplies a default delegate to handle the IControlDesignerView.ViewEvent event. 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.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.

Requirements

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