How to: Change Page's Position in XtraTabControl

Example 1

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);

Example 2

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);