ViewEventArgs 类

定义

ViewEvent 事件提供数据。Provides data for the ViewEvent event.

public ref class ViewEventArgs : EventArgs
public class ViewEventArgs : EventArgs
type ViewEventArgs = class
    inherit EventArgs
Public Class ViewEventArgs
Inherits EventArgs
继承
ViewEventArgs

注解

ViewEvent事件由设计器宿主为设计图面上的控件上的某些操作引发。The ViewEvent event is raised by the designer host for certain actions on a control on the design surface. 由委托方法进行处理, 该方法采用对象作为参数。ViewEventArgs ViewEventHandler ViewEventThe ViewEvent is handled by a ViewEventHandler delegate method, which takes a ViewEventArgs object as a parameter.

类提供一个默认委托来ViewEvent处理。 ControlDesignerThe ControlDesigner class supplies a default delegate to handle the ViewEvent. 自定义控件设计器OnClickOnPaint重写OnTemplateModeChanged 、和方法, 以便为设计图面上的控件处理这些事件。Custom control designers override the OnClick, OnPaint, and OnTemplateModeChanged methods to process those events for the control on the design surface.

设计器宿主为设计图ViewEventArgs面上的操作类型初始化对象, 然后将该对象传递ViewEventHandler给委托。The designer host initializes a ViewEventArgs object for the type of action on the design surface, and then passes the object to the ViewEventHandler delegate. Region属性表示应用了事件的控件设计器区域。The Region property represents the control designer region that the event applies to. ViewEventArgs对象EventType的属性指示操作的类型:The EventType property of the ViewEventArgs object indicates which type of action:

EventArgs属性提供特定于操作类型的事件参数。The EventArgs property supplies the event arguments that are specific to the type of action.

例如, 设计器宿主按如下ViewEventArgs方式初始化对象:For example, the designer host initializes ViewEventArgs objects as follows:

有关事件和委托的详细信息, 请参阅处理和引发事件For more information about events and delegates, see Handling and Raising Events.

构造函数

ViewEventArgs(ViewEvent, DesignerRegion, EventArgs)

初始化设计图面上的查看事件的类型的 ViewEventArgs 类的新实例。Initializes a new instance of the ViewEventArgs class for the type of view event on the design surface.

属性

EventArgs

获取与引发事件的操作相关联的事件参数。Gets the event arguments that are associated with the action that raised the event.

EventType

获取引发该事件的操作的类型。Gets the type of action that raised the event.

Region

获取应用事件的设计器区域。Gets the designer region that the event applies to.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅