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
- 继承
注解
WebPartVerbsEventArgs类表示事件的事件数据 CreateVerbs ,当为派生自类的区域创建 Web 部件谓词时发生此事件 WebPartZoneBase 。The 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() |
初始化 WebPartVerbsEventArgs 类的新实例。Initializes a new instance of the WebPartVerbsEventArgs class. |
| WebPartVerbsEventArgs(WebPartVerbCollection) |
使用指定的 Web 部件谓词集合初始化 WebPartVerbsEventArgs 类的新实例。Initializes a new instance of the WebPartVerbsEventArgs class using the specified Web Parts verb collection. |
属性
| Verbs |
获取或设置事件数据中使用的 Web 部件谓词。Gets or sets the Web Parts verbs used in the event data. |
方法
| Equals(Object) |
确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
| GetHashCode() |
作为默认哈希函数。Serves as the default hash function. (继承自 Object) |
| GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
| MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
| ToString() |
返回表示当前对象的字符串。Returns a string that represents the current object. (继承自 Object) |