TabControl.TabPageCollection TabControl.TabPageCollection TabControl.TabPageCollection TabControl.TabPageCollection Class

定义

包含 TabPage 对象的集合。Contains a collection of TabPage objects.

public: ref class TabControl::TabPageCollection : System::Collections::IList
public class TabControl.TabPageCollection : System.Collections.IList
type TabControl.TabPageCollection = class
    interface IList
    interface ICollection
    interface IEnumerable
Public Class TabControl.TabPageCollection
Implements IList
继承
TabControl.TabPageCollectionTabControl.TabPageCollectionTabControl.TabPageCollectionTabControl.TabPageCollection
实现

注解

此集合中选项卡页的顺序反映了相关TabControl控件中选项卡的顺序。The order of tab pages in this collection reflects the order of tabs in the related TabControl control. 若要更改控件中选项卡的顺序,您必须通过删除它们并将其插入到新索引来更改它们在集合中的位置。To change the order of tabs in the control, you must change their positions in the collection by removing them and inserting them at new indexes.

构造函数

TabControl.TabPageCollection(TabControl) TabControl.TabPageCollection(TabControl) TabControl.TabPageCollection(TabControl) TabControl.TabPageCollection(TabControl)

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

属性

Count Count Count Count

获取集合中选项卡页的数目。Gets the number of tab pages in the collection.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

获取一个值,该值指示集合是否为只读。Gets a value indicating whether the collection is read-only.

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

获取或设置集合中的 TabPageGets or sets a TabPage in the collection.

Item[String] Item[String] Item[String] Item[String]

获取带有来自集合的指定键的选项卡页。Gets a tab page with the specified key from the collection.

方法

Add(String) Add(String) Add(String) Add(String)

创建带有指定文本的选项卡页,并将其添加到集合。Creates a tab page with the specified text, and adds it to the collection.

Add(String, String) Add(String, String) Add(String, String) Add(String, String)

创建带有指定文本和键的选项卡页,并将该选项卡页添加到集合。Creates a tab page with the specified text and key, and adds it to the collection.

Add(String, String, Int32) Add(String, String, Int32) Add(String, String, Int32) Add(String, String, Int32)

创建带有指定键、文本和图像的选项卡页,并将该选项卡页添加到集合。Creates a tab page with the specified key, text, and image, and adds it to the collection.

Add(String, String, String) Add(String, String, String) Add(String, String, String) Add(String, String, String)

创建带有指定键、文本和图像的选项卡页,并将该选项卡页添加到集合。Creates a tab page with the specified key, text, and image, and adds it to the collection.

Add(TabPage) Add(TabPage) Add(TabPage) Add(TabPage)

TabPage 添加到集合。Adds a TabPage to the collection.

AddRange(TabPage[]) AddRange(TabPage[]) AddRange(TabPage[]) AddRange(TabPage[])

将一组选项卡页添加到集合。Adds a set of tab pages to the collection.

Clear() Clear() Clear() Clear()

从集合中移除所有的选项卡页。Removes all the tab pages from the collection.

Contains(TabPage) Contains(TabPage) Contains(TabPage) Contains(TabPage)

确定指定的选项卡页是否在集合中。Determines whether a specified tab page is in the collection.

ContainsKey(String) ContainsKey(String) ContainsKey(String) ContainsKey(String)

确定集合是否包含带有指定键的选项卡页。Determines whether the collection contains a tab page with the specified key.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

返回集合中所有选项卡页的枚举。Returns an enumeration of all the tab pages in the collection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

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

(Inherited from Object)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
IndexOf(TabPage) IndexOf(TabPage) IndexOf(TabPage) IndexOf(TabPage)

返回集合中指定选项卡页的索引。Returns the index of the specified tab page in the collection.

IndexOfKey(String) IndexOfKey(String) IndexOfKey(String) IndexOfKey(String)

返回带有指定键的 TabPage 的第一个匹配项的索引。Returns the index of the first occurrence of the TabPage with the specified key.

Insert(Int32, String) Insert(Int32, String) Insert(Int32, String) Insert(Int32, String)

创建带有指定文本的新选项卡页,并将该选项卡页插入到集合中的指定索引处。Creates a new tab page with the specified text and inserts it into the collection at the specified index.

Insert(Int32, String, String) Insert(Int32, String, String) Insert(Int32, String, String) Insert(Int32, String, String)

创建带有指定键和文本的新选项卡页,并将该选项卡页插入集合中的指定索引处。Creates a new tab page with the specified key and text, and inserts it into the collection at the specified index.

Insert(Int32, String, String, Int32) Insert(Int32, String, String, Int32) Insert(Int32, String, String, Int32) Insert(Int32, String, String, Int32)

创建带有指定键、文本和图像的新选项卡页,并将该选项卡页插入集合中的指定索引处。Creates a new tab page with the specified key, text, and image, and inserts it into the collection at the specified index.

Insert(Int32, String, String, String) Insert(Int32, String, String, String) Insert(Int32, String, String, String) Insert(Int32, String, String, String)

创建带有指定键、文本和图像的选项卡页,并将该选项卡页插入集合中的指定索引处。Creates a tab page with the specified key, text, and image, and inserts it into the collection at the specified index.

Insert(Int32, TabPage) Insert(Int32, TabPage) Insert(Int32, TabPage) Insert(Int32, TabPage)

将现有的选项卡页插入到集合中的指定索引处。Inserts an existing tab page into the collection at the specified index.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

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

(Inherited from Object)
Remove(TabPage) Remove(TabPage) Remove(TabPage) Remove(TabPage)

从集合中移除 TabPageRemoves a TabPage from the collection.

RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

从集合中移除指定索引处的选项卡页。Removes the tab page at the specified index from the collection.

RemoveByKey(String) RemoveByKey(String) RemoveByKey(String) RemoveByKey(String)

从集合中移除带有指定键的选项卡页。Removes the tab page with the specified key from the collection.

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

显式界面实现

ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)

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

ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

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

ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

获取可用于同步对 TabControl.TabPageCollection 的访问的对象。Gets an object that can be used to synchronize access to the TabControl.TabPageCollection.

IList.Add(Object) IList.Add(Object) IList.Add(Object) IList.Add(Object)

TabPage 控件添加到集合。Adds a TabPage control to the collection.

IList.Contains(Object) IList.Contains(Object) IList.Contains(Object) IList.Contains(Object)

确定指定的 TabPage 控件是否在 TabControl.TabPageCollection 中。Determines whether the specified TabPage control is in the TabControl.TabPageCollection.

IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object)

返回集合中指定的 TabPage 控件的索引。Returns the index of the specified TabPage control in the collection.

IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object)

在集合中插入 TabPage 控件。Inserts a TabPage control into the collection.

IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize

获取一个值,该值指示 TabControl.TabPageCollection 是否具有固定大小。Gets a value indicating whether the TabControl.TabPageCollection has a fixed size.

IList.Item[Int32] IList.Item[Int32] IList.Item[Int32] IList.Item[Int32]

获取或设置集合中的 TabPageGets or sets a TabPage in the collection.

IList.Remove(Object) IList.Remove(Object) IList.Remove(Object) IList.Remove(Object)

从集合中移除 TabPageRemoves a TabPage from the collection.

扩展方法

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

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

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

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

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于

另请参阅