Skip to main content
Tab

TabPageCollection.IndexOf(TabPage) Method

Searches for the specified tab page object and returns the zero-based index of the first occurrence within the tab page collection.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public int IndexOf(
    TabPage tabPage
)

Parameters

Name Type Description
tabPage TabPage

A TabPage object representing the tab page to locate in the collection.

Returns

Type Description
Int32

The zero-based index of the first occurrence of the specified tab page within the tab page collection, if found; otherwise, the negative one (-1).

Remarks

The IndexOf method enables you to determine where a tab page specified by the tabPage parameter is located within the tab page collection represented by the current object. The collection of tab page objects can be accessed via the ASPxPageControl.TabPages property of a Page control.

This method searches the tab page collection for the specified tab page and, if found, returns the index value of the first occurrence. If no instance is found, the negative one (-1) is returned. The collection of tab pages is searched forward starting with the first element and ending with the last one.

See Also