Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

XtraTabPageCollection.Move(Int32, XtraTabPage) Method

Moves the page to another position within the collection.

Namespace: DevExpress.XtraTab

Assembly: DevExpress.XtraEditors.v24.2.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