Skip to main content

XtraTabPageCollection.Move(Int32, XtraTabPage) Method

Moves the page to another position within the collection.

Namespace: DevExpress.XtraTab

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public virtual void Move(
    int newPosition,
    XtraTabPage page
)

Parameters

Name Type Description
newPosition Int32

A zero-based integer specifying the position within the collection to move the page to.

page XtraTabPage

An XtraTabPage object which represents the tab page to move.

Remarks

If the newPosition parameter exceeds the number of elements within the collection, the tab page is moved to the end of the collection. If the parameter’s value is negative, the tab page is moved to the beginning of the collection.

Example

The following code shows how to move the third page backward to the second position within the tab page collection. The XtraTabPageCollection.Move method is used to change the page’s position.

The result is displayed below:

XtraTabControl_TabPages_Move_ex2

xtraTabControl1.TabPages.Move(1, xtraTabPage3);

Example

The following code shows how to move the first page forward to the second position within the tab page collection. The XtraTabPageCollection.Move method is used to change the page’s position. Note that the method’s newPosition parameter must be set to 2 to make the first page displayed at position 1.

The result is displayed below:

XtraTabControl_TabPages_Move_ex

xtraTabControl1.TabPages.Move(2, xtraTabPage1);
See Also