Back to Devexpress

How to: Change Page's Position in XtraTabControl

windowsforms-9531-controls-and-libraries-editors-and-simple-controls-examples-how-to-change-pages-position-in-xtratabcontrol.md

latest1.5 KB
Original Source

How to: Change Page's Position in XtraTabControl

  • Oct 25, 2019

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:

csharp
xtraTabControl1.TabPages.Move(2, xtraTabPage1);
vb
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:

csharp
xtraTabControl1.TabPages.Move(1, xtraTabPage3);
vb
XtraTabControl1.TabPages.Move(1, XtraTabPage3)