WebPartVerbCollection 类

定义

表示自定义 Web 部件谓词的集合。Represents a collection of custom Web Parts verbs. 此类不能被继承。This class cannot be inherited.

public ref class WebPartVerbCollection sealed : System::Collections::ReadOnlyCollectionBase
public sealed class WebPartVerbCollection : System.Collections.ReadOnlyCollectionBase
type WebPartVerbCollection = class
    inherit ReadOnlyCollectionBase
Public NotInheritable Class WebPartVerbCollection
Inherits ReadOnlyCollectionBase
继承
WebPartVerbCollection

注解

Web 部件谓词是显示在 Web 部件控件的菜单或标题栏中的交互式用户界面 (UI) 元素。Web Parts verbs are interactive user interface (UI) elements that are displayed in a menu or title bar of a Web Parts control. Web 部件区域提供 Web 部件控制在 Web 部件谓词菜单中呈现的一组标准谓词。A Web Parts zone provides to a Web Parts control a standard set of verbs that are rendered in the Web Parts verb menu. 自定义 Web 部件区域或 Web 部件控件可以向此菜单添加其他谓词。A custom Web Parts zone or a Web Parts control can add additional verbs to this menu.

默认情况下, ASP.NET 为 Web 部件区域中的所有控件提供若干标准谓词, 包括关闭和最小化谓词。ASP.NET provides several standard verbs by default to all controls in a Web Parts zone, including the close and minimize verbs. 有一些标准谓词可用于打开、关闭、编辑和最小化控件, 以及用于导出控件定义或加载帮助文件的其他谓词。There are standard verbs for opening, closing, editing, and minimizing a control, and other verbs for exporting a definition for the control or loading a Help file.

你可以创建添加到 Web 部件谓词菜单中的新谓词。You can create new verbs that are added to the Web Parts verb menu. 控件可以从WebPart基类继承, 并将对象添加WebPartVerbWebPartVerbCollection集合中。A control can inherit from the WebPart base class and add WebPartVerb objects to a WebPartVerbCollection collection. 然后, 可以将此集合添加到Verbs控件的集合中。This collection can then be added to the Verbs collection of the control.

控件还可以实现IWebActionable接口并重Verbs写属性。A control can also implement the IWebActionable interface and override the Verbs property. 然后, 可以使用WebPartVerbCollection集合将自定义谓词添加到控件。You can then use a WebPartVerbCollection collection to add custom verbs to a control.

此类实现ReadOnlyCollectionBase, 它提供非泛型只读集合。This class implements ReadOnlyCollectionBase, which provides a non-generic, read-only collection.

构造函数

WebPartVerbCollection()

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

WebPartVerbCollection(ICollection)

使用指定的集合初始化 WebPartVerbCollection 类的新实例。Initializes a new instance of the WebPartVerbCollection class using the specified collection.

WebPartVerbCollection(WebPartVerbCollection, ICollection)

使用指定的集合初始化 WebPartVerbCollection 类的新实例。Initializes a new instance of the WebPartVerbCollection class using the specified collections.

字段

Empty

指定一个可以使用的空集合,而不是创建一个新集合。Specifies an empty collection that you can use instead of creating a new one. 此静态字段是只读的。This static field is read-only.

属性

Count

获取包含在 ReadOnlyCollectionBase 实例中的元素数。Gets the number of elements contained in the ReadOnlyCollectionBase instance.

(继承自 ReadOnlyCollectionBase)
InnerList

获取 ReadOnlyCollectionBase 实例中包含的元素的列表。Gets the list of elements contained in the ReadOnlyCollectionBase instance.

(继承自 ReadOnlyCollectionBase)
Item[Int32]

获取集合中指定索引处的 Web 部件谓词。Gets a Web Parts verb from the collection at the specified index.

方法

Contains(WebPartVerb)

搜索指定 WebPartVerb 对象的 Web 部件谓词集合。Searches the Web Parts verb collection for the specified WebPartVerb object.

CopyTo(WebPartVerb[], Int32)

从指定索引处开始,将集合中的元素复制到指定数组。Copies elements of the collection to the specified array, starting at the specified index.

Equals(Object)

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

(继承自 Object)
GetEnumerator()

返回循环访问 ReadOnlyCollectionBase 实例的枚举器。Returns an enumerator that iterates through the ReadOnlyCollectionBase instance.

(继承自 ReadOnlyCollectionBase)
GetHashCode()

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

(继承自 Object)
GetType()

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

(继承自 Object)
IndexOf(WebPartVerb)

搜索指定的 Web 部件谓词,并返回整个集合中第一个匹配项的从零开始的索引。Searches for the specified Web Parts verb and returns the zero-based index of the first occurrence within the entire collection.

MemberwiseClone()

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

(继承自 Object)
ToString()

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

(继承自 Object)

显式接口实现

ICollection.CopyTo(Array, Int32)

从目标数组的指定索引处开始将整个 ReadOnlyCollectionBase 复制到兼容的一维 ArrayCopies the entire ReadOnlyCollectionBase to a compatible one-dimensional Array, starting at the specified index of the target array.

(继承自 ReadOnlyCollectionBase)
ICollection.IsSynchronized

获取一个值,该值指示对 ReadOnlyCollectionBase 对象的访问是否同步(线程安全)。Gets a value indicating whether access to a ReadOnlyCollectionBase object is synchronized (thread safe).

(继承自 ReadOnlyCollectionBase)
ICollection.SyncRoot

获取一个对象,该对象可用于同步对 ReadOnlyCollectionBase 对象的访问。Gets an object that can be used to synchronize access to a ReadOnlyCollectionBase object.

(继承自 ReadOnlyCollectionBase)

扩展方法

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于

另请参阅