In This Article

TabStripPageCollection Class

Encapsulates a collection of TabStripPage components.

[TypeConverter(typeof(TabStripPageCollectionConverter))]
public class TabStripPageCollection
Inheritance:
object object

Remarks

This class is a zero-based indexed collection.

Constructors

TabStripPageCollection(ControlCollection)

Initializes a new instance of the TabStripPageCollection class.

public TabStripPageCollection(Control.ControlCollection tabStripControls)
Parameter Type Description
tabStripControls Control.ControlCollection

The control collection to link to.

See Also

Properties

Count

Gets the number of pages contained in the collection.

public virtual int Count { get; }

Property Value

int:

The number of pages contained in the collection.

See Also

IsFixedSize

Gets a value indicating whether the collection has a fixed size.

public bool IsFixedSize { get; }

Property Value

bool:

true if the collection has a fixed size; otherwise, false.

Remarks

A collection with a fixed size does not allow the addition or removal of elements, but it allows the modification of existing elements.

See Also

IsReadOnly

Gets a value indicating whether the collection is read-only.

public bool IsReadOnly { get; }

Property Value

bool:

true if the collection is read-only; otherwise, false.

See Also

IsSynchronized

Gets a value indicating whether access to the collection is synchronized (thread-safe).

public virtual bool IsSynchronized { get; }

Property Value

bool:

true if the collection is synchronized (thread-safe); otherwise, false.

Remarks

To guarantee the thread safety of the collection, all operations must be done through the wrapper returned by the SyncRoot property.

See Also

this[int]

Gets the TabStripPage at the specified index.

[C#] In C#, this property is the indexer for the TabStripPageCollection class.

public TabStripPage this[int index] { get; set; }
Parameter Type Description
index int

The index of the TabStripPage to return.

Property Value

TabStripPage:

The TabStripPage at the specified index.

See Also

this[string]

Gets the TabStripPage with the specified key.

public TabStripPage this[string key] { get; }
Parameter Type Description
key string

The key of the TabStripPage to return.

Property Value

TabStripPage:

The TabStripPage with the specified key.

See Also

SyncRoot

Gets an Object that can be used to synchronize access to the collection.

public virtual object SyncRoot { get; }

Property Value

object:

An Object that can be used to synchronize access to the collection.

See Also

Methods

Add(TabStripPage)

Adds the specified TabStripPage to the collection.

public int Add(TabStripPage page)
Parameter Type Description
page TabStripPage

The TabStripPage to add.

Returns

int:

The index of the TabStripPage that was inserted.

See Also

AddRange(TabStripPage[])

Adds the specified array of TabStripPage controls to the collection.

public void AddRange(TabStripPage[] pages)
Parameter Type Description
pages TabStripPage[]

The array of TabStripPage controls to add.

See Also

Clear()

Removes all TabStripPage objects from the collection.

public void Clear()

See Also

Contains(TabStripPage)

Determines whether the specified TabStripPage is in the collection.

public bool Contains(TabStripPage page)
Parameter Type Description
page TabStripPage

The TabStripPage to look for.

Returns

bool:

true if the collection contains the TabStripPage; otherwise, false.

See Also

Contains(string)

Determines whether the a TabStripPage with the specified key is in the collection.

public virtual bool Contains(string key)
Parameter Type Description
key string

The key of the TabStripPage to look for.

Returns

bool:

true if the collection contains a TabStripPage with the specified key; otherwise, false.

See Also

CopyTo(Array, int)

Copies the entire collection to a compatible one-dimensional Array, starting at the specified index of the target array.

public virtual void CopyTo(Array array, int arrayIndex)
Parameter Type Description
array Array

The one-dimensional Array that is the destination of the elements copied from the collection. The Array must have zero-based indexing.

arrayIndex int

The zero-based index in array at which copying begins.

See Also

GetEnumerator()

Retrieves an IEnumerator object for the entire collection.

public virtual IEnumerator GetEnumerator()

Returns

IEnumerator:

An IEnumerator object for the entire collection

Remarks

Enumerators are intended to be used only to read data in the collection. Enumerators cannot be used to modify the underlying collection.

The enumerator does not have exclusive access to the collection.

When an enumerator is instantiated, it takes a snapshot of the current state of the collection. If changes are made to the collection, such as adding, modifying or deleting elements, the snapshot gets out of sync and the enumerator throws an InvalidOperationException. Two enumerators instantiated from the same collection at the same time can have different snapshots of the collection.

See Also

IndexOf(TabStripPage)

Returns the index of the specified TabStripPage in the collection.

public int IndexOf(TabStripPage page)
Parameter Type Description
page TabStripPage

The TabStripPage to look for.

Returns

int:

If found, the index where the TabStripPage is in the collection; otherwise, -1.

See Also

IndexOf(string)

Returns the index of the TabStripPage with the specified key in the collection.

public int IndexOf(string key)
Parameter Type Description
key string

The key of the TabStripPage to look for.

Returns

int:

If found, the index where the TabStripPage is in the collection; otherwise, -1.

See Also

Insert(int, TabStripPage)

Inserts an TabStripPage into the specified location in the collection.

public void Insert(int index, TabStripPage page)
Parameter Type Description
index int

The index at which to place the TabStripPage.

page TabStripPage

The TabStripPage to add.

See Also

MoveTo(TabStripPage, int)

Moves a TabStripPage to the specified index.

public void MoveTo(TabStripPage page, int newIndex)
Parameter Type Description
page TabStripPage

The TabStripPage to move.

newIndex int

The new index.

See Also

Remove(TabStripPage)

Removes the specified TabStripPage from the collection.

public void Remove(TabStripPage page)
Parameter Type Description
page TabStripPage

The TabStripPage to remove.

See Also

RemoveAt(int)

Removes the TabStripPage at the specified index from the collection.

public void RemoveAt(int index)
Parameter Type Description
index int

The index of the TabStripPage to remove.

See Also

Inherited Members

See Also