TabPageCollection
Namespace: Wisej.Web
Assembly: Wisej.Framework (3.5.0.0)
Contains a collection of TabPage objects.
- C#
- VB.NET
public class TabPageCollection : IList, ICollection, IEnumerable, IList<TabPage>, ICollection<TabPage>, IEnumerable<TabPage>
Public Class TabPageCollection
Inherits IList
Implements ICollection, IEnumerable, IList(Of TabPage), ICollection(Of TabPage), IEnumerable(Of TabPage)
Properties
Count
Int32: Returns the number of tab pages in the collection.
Item(index)
TabPage: Returns or sets a TabPage in the collection at the specified index.
Throws:
- ArgumentOutOfRangeException index is less than zero or greater than the highest available index.
- ArgumentNullException value is null.
Item(name)
TabPage: Returns the TabPage with the specified key from the collection.
Methods
Add(tabPage)
Adds a TabPage to the collection.
| Parameter | Type | Description |
|---|---|---|
| tabPage | TabPage | The TabPage to add. |
Throws:
- ArgumentNullException The specified tabPage is null.
Add(text)
Creates a TabPage with the specified text, and adds it to the collection.
| Parameter | Type | Description |
|---|---|---|
| text | String | The text to display on the TabPage. |
Add(key, text)
Creates a TabPage with the specified key and text and adds it to the collection.
| Parameter | Type | Description |
|---|---|---|
| key | String | The name of the TabPage. |
| text | String | The text to display on the TabPage. |
Add(key, text, imageIndex)
Creates a TabPage with the specified key, text, and image, and adds it to the collection.
| Parameter | Type | Description |
|---|---|---|
| key | String | The name of the TabPage. |
| text | String | The text to display on the TabPage. |
| imageIndex | Int32 | The index of the image to display on the TabPage. |
Add(key, text, imageKey)
Creates a TabPage with the specified key, text, and image, and adds it to the collection.
| Parameter | Type | Description |
|---|---|---|
| key | String | The name of the TabPage. |
| text | String | The text to display on the TabPage. |
| imageKey | String | The key of the image to display on the TabPage. |
AddRange(pages)
Adds a set of TabPage pages to the collection.
| Parameter | Type | Description |
|---|---|---|
| pages | TabPage[] | An array of type TabPage that contains the TabPage pages to add. |
Throws:
- ArgumentNullException The value of pages is null.
Clear()
Removes all the TabPage pages from the collection.
Clear(dispose)
Removes and disposes all TabPage pages from the collection.
| Parameter | Type | Description |
|---|---|---|
| dispose | Boolean | Indicates whether to dispose the TabPage pages removed from the collection. |
Contains(tabPage)
Determines whether a specified TabPage is in the collection.
| Parameter | Type | Description |
|---|---|---|
| tabPage | TabPage | The TabPage to locate in the collection. |
Returns: Boolean. true if the specified TabPage is in the collection; otherwise, false.
Throws:
- ArgumentNullException The value of tabPage is null.
ContainsKey(key)
Determines whether the collection contains a TabPage with the specified key.
| Parameter | Type | Description |
|---|---|---|
| key | String | The name of the TabPage page to search for. |
Returns: Boolean. true to indicate a TabPage page with the specified key was found in the collection; otherwise, false.
CopyTo(array, index)
Copies the TabPage pages in the collection to the specified array, starting at the specified index.
| Parameter | Type | Description |
|---|---|---|
| array | TabPage[] | The one-dimensional array that is the destination of the tab pages copied from the collection. The array must have zero-based indexing. |
| index | Int32 | The zero-based index in the array at which copying begins. |
Throws:
- ArgumentNullException array is null.
- ArgumentOutOfRangeException array is less than zero.
- ArgumentException array is multidimensional or the number of elements in the TabPageCollection is greater than the available space from index to the end of array .
IndexOf(tabPage)
Returns the index of the TabPage in the collection.
| Parameter | Type | Description |
|---|---|---|
| tabPage | TabPage | The TabPage to locate in the collection. |
Returns: Int32. The zero-based index of the tab page; -1 if it cannot be found.
Throws:
- ArgumentNullException The value of tabPage is null.
IndexOfKey(key)
Returns the index of the first occurrence of the TabPage with the specified key.
| Parameter | Type | Description |
|---|---|---|
| key | String | The name of the TabPage to find in the collection. |
Returns: Int32. The zero-based index of the first occurrence of a TabPage with the specified key, if found; otherwise, -1.
Insert(index, tabPage)
Inserts an existing TabPage into the collection at the specified index.
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | The zero-based index location where the TabPage page is inserted. |
| tabPage | TabPage | The TabPage to insert in the collection. |
Insert(index, text)
Creates a new TabPage with the specified text and inserts it into the collection at the specified index.
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | The zero-based index location where the TabPage page is inserted. |
| text | String | The text to display in the TabPage page. |
Insert(index, key, text)
Creates a new TabPage with the specified key and text, and inserts it into the collection at the specified index.
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | The zero-based index location where the TabPage is inserted. |
| key | String | The name of the TabPage. |
| text | String | The text to display on the TabPage. |
Insert(index, key, text, imageIndex)
Creates a new TabPage with the specified key, text, and image, and inserts it into the collection at the specified index.
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | The zero-based index location where the TabPage is inserted |
| key | String | The name of the tab page. |
| text | String | The text to display on the TabPage. |
| imageIndex | Int32 | The zero-based index of the image to display on the TabPage. |
Insert(index, key, text, imageKey)
Creates a TabPage with the specified key, text, and image, and inserts it into the collection at the specified index.
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | The zero-based index location where the TabPage is inserted. |
| key | String | The name of the tab page. |
| text | String | The text to display on the TabPage. |
| imageKey | String | The key of the image to display on the TabPage. |
Remove(tabPage)
Removes the TabPage from the collection.
| Parameter | Type | Description |
|---|---|---|
| tabPage | TabPage | The TabPage to remove. |
Throws:
- ArgumentNullException The tabPage parameter is null.
RemoveAt(index)
Removes the TabPage at the specified index from the collection.
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | The zero-based index of the TabPage to remove. |
RemoveByKey(key)
Removes the TabPage with the specified key from the collection.
| Parameter | Type | Description |
|---|---|---|
| key | String | The name of the TabPage page to remove. |