Back to Devexpress

XtraTabControl.SelectedTabPageIndex Property

windowsforms-devexpress-dot-xtratab-dot-xtratabcontrol-18132fb5.md

latest6.6 KB
Original Source

XtraTabControl.SelectedTabPageIndex Property

Gets or sets the index of the currently selected tab page.

Namespace : DevExpress.XtraTab

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
public virtual int SelectedTabPageIndex { get; set; }
vb
<Browsable(False)>
Public Overridable Property SelectedTabPageIndex As Integer

Property Value

TypeDescription
Int32

A zero-based integer which specifies the index of the selected tab page.

|

Remarks

Use this property to determine which tab page is currently selected or to select the desired page contained at the specified position in the XtraTabControl.TabPages collection. If the tab page is not visible, the pages are scrolled to make the desired page visible.

The tab page cannot be selected if it’s disabled (its XtraTabPage.PageEnabled property is set to false ). If there are no pages in a tab control the SelectedTabPageIndex property returns -1.

Changing the SelectedTabPageIndex property’s value raises the XtraTabControl.SelectedPageChanged event.

The following code snippets (auto-collected from DevExpress Examples) contain references to the SelectedTabPageIndex property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-spreadsheet-chart-api/CS/SpreadsheetChartAPISamples/Form1.cs#L137

csharp
{
    get { return (ExampleLanguage)xtraTabControl1.SelectedTabPageIndex; }
    set

winforms-spreadsheet-pivot-table-api/CS/SpreadsheetPivotTableExamples/Form1.cs#L125

csharp
{
    get { return (ExampleLanguage)xtraTabControl1.SelectedTabPageIndex; }
    set

winforms-richeditcontrol-common-api/CS/RichEditAPISample/Form1.cs#L406

csharp
ExampleLanguage CurrentExampleLanguage {
    get { return (ExampleLanguage)xtraTabControl1.SelectedTabPageIndex; }
    set {

spreadsheet-document-api-examples-part2/CS/SpreadsheetDocServerAPIPart2/Form1.cs#L83

csharp
{
    get { return (ExampleLanguage)xtraTabControl1.SelectedTabPageIndex; }
    set

spreadsheet-document-api-pivot-table-examples/CS/SpreadsheetDocServerPivotAPI/Form1.cs#L98

csharp
{
    get { return (ExampleLanguage)xtraTabControl1.SelectedTabPageIndex; }
    set

winforms-spreadsheet-chart-api/VB/SpreadsheetChartAPISamples/Form1.vb#L133

vb
Get
    Return CType(xtraTabControl1.SelectedTabPageIndex, ExampleLanguage)
End Get

winforms-spreadsheet-pivot-table-api/VB/SpreadsheetPivotTableExamples/Form1.vb#L119

vb
Get
    Return CType(xtraTabControl1.SelectedTabPageIndex, ExampleLanguage)
End Get

winforms-richeditcontrol-common-api/VB/RichEditAPISample/Form1.vb#L397

vb
Get
    Return CType(xtraTabControl1.SelectedTabPageIndex, ExampleLanguage)
End Get

spreadsheet-document-api-examples-part2/VB/SpreadsheetDocServerAPIPart2/Form1.vb#L80

vb
Get
    Return CType(xtraTabControl1.SelectedTabPageIndex, ExampleLanguage)
End Get

spreadsheet-document-api-pivot-table-examples/VB/SpreadsheetDocServerPivotAPI/Form1.vb#L92

vb
Get
    Return CType(xtraTabControl1.SelectedTabPageIndex, ExampleLanguage)
End Get

See Also

PageEnabled

SelectedTabPage

SelectedPageChanged

SelectedPageChanging

Deselected

Deselecting

Selected

Selecting

SelectedPageChangeAnimationCompleted

XtraTabControl Class

XtraTabControl Members

DevExpress.XtraTab Namespace