WebPartVerbsEventArgs 类


CreateVerbs 方法所用的 OnCreateVerbs(WebPartVerbsEventArgs) 事件提供事件数据。Provides event data for the CreateVerbs event that is used by the OnCreateVerbs(WebPartVerbsEventArgs) method.

public ref class WebPartVerbsEventArgs : EventArgs
public class WebPartVerbsEventArgs : EventArgs
type WebPartVerbsEventArgs = class
    inherit EventArgs
Public Class WebPartVerbsEventArgs
Inherits EventArgs


类表示CreateVerbs事件的事件数据, 当为派生自WebPartZoneBase类的区域创建 Web 部件谓词时发生此事件。 WebPartVerbsEventArgsThe WebPartVerbsEventArgs class represents the event data for the CreateVerbs event, which occurs when the Web Parts verbs are created for a zone that derives from the WebPartZoneBase class.

Web 部件谓词表示用户可在 Web 部件页的用户界面 (UI) 中执行的操作, 例如最小化、关闭或还原控件;向页面添加控件;或取消操作。Web Parts verbs represent actions that users can perform in the user interface (UI) of a Web Parts page, such as minimizing, closing, or restoring controls; adding controls to a page; or canceling an action. 谓词既可以出现在区域的标头区域中, 也可以同时出现在 Web 部件控制集和自定义谓词 (可由开发人员添加) 中。Verbs can appear in both the header and footer areas of a zone, and there are both standard verbs provided with the Web Parts control set, and custom verbs that can be added by developers. 谓词由可单击对象在 UI 中表示, 您可以使用VerbButtonType属性将其设置为显示为超链接、图像或按钮。A verb is represented in the UI by a clickable object, which you can set to appear as a hyperlink, an image, or a button, by using the VerbButtonType property.

WebPartZone区域提供一组标准谓词, 该谓词在 Web 部件控件的谓词菜单中呈现。A WebPartZone zone provides a standard set of verbs that get rendered in a Web Parts control's verbs menu. 自定义 Web 部件区域, 或 Web 部件区域内的 Web 部件控件, 可以向菜单添加其他谓词。A custom Web Parts zone, or a Web Parts control inside a Web Parts zone, can add additional verbs to the menu.

Web 部件区域中的控件可以通过从WebPart基类继承并重Verbs写属性, 将谓词添加到控件的谓词菜单。A control in a Web Parts zone can add verbs to the control's verbs menu by inheriting from the WebPart base class and overriding the Verbs property. 如果控件不是从WebPart基类继承的, 则可以通过IWebActionable实现接口来添加一个新谓词, 然后重写该Verbs集合。If the control does not inherit from the WebPart base class, you can add a new verb by implementing the IWebActionable interface, and then overriding the Verbs collection.

通过受WebPartZoneBase.OnCreateVerbs保护的方法, 派生类可以重写事件, 而无需附加委托。The protected WebPartZoneBase.OnCreateVerbs method allows derived classes to override the event without attaching a delegate to it. 派生类必须始终调用OnCreateVerbs基类的方法, 以确保注册的委托接收事件。A derived class must always call the OnCreateVerbs method of the base class to ensure that registered delegates receive the event.



初始化 WebPartVerbsEventArgs 类的新实例。Initializes a new instance of the WebPartVerbsEventArgs class.


使用指定的 Web 部件谓词集合初始化 WebPartVerbsEventArgs 类的新实例。Initializes a new instance of the WebPartVerbsEventArgs class using the specified Web Parts verb collection.



获取或设置事件数据中使用的 Web 部件谓词。Gets or sets the Web Parts verbs used in the event data.



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

(继承自 Object)

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

(继承自 Object)

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

(继承自 Object)

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

(继承自 Object)

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

(继承自 Object)