windowsforms-devexpress-dot-xtratab-dot-xtratabcontrol-18132fb5.md
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
[Browsable(false)]
public virtual int SelectedTabPageIndex { get; set; }
<Browsable(False)>
Public Overridable Property SelectedTabPageIndex As Integer
| Type | Description |
|---|---|
| Int32 |
A zero-based integer which specifies the index of the selected tab page.
|
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
{
get { return (ExampleLanguage)xtraTabControl1.SelectedTabPageIndex; }
set
winforms-spreadsheet-pivot-table-api/CS/SpreadsheetPivotTableExamples/Form1.cs#L125
{
get { return (ExampleLanguage)xtraTabControl1.SelectedTabPageIndex; }
set
winforms-richeditcontrol-common-api/CS/RichEditAPISample/Form1.cs#L406
ExampleLanguage CurrentExampleLanguage {
get { return (ExampleLanguage)xtraTabControl1.SelectedTabPageIndex; }
set {
spreadsheet-document-api-examples-part2/CS/SpreadsheetDocServerAPIPart2/Form1.cs#L83
{
get { return (ExampleLanguage)xtraTabControl1.SelectedTabPageIndex; }
set
spreadsheet-document-api-pivot-table-examples/CS/SpreadsheetDocServerPivotAPI/Form1.cs#L98
{
get { return (ExampleLanguage)xtraTabControl1.SelectedTabPageIndex; }
set
winforms-spreadsheet-chart-api/VB/SpreadsheetChartAPISamples/Form1.vb#L133
Get
Return CType(xtraTabControl1.SelectedTabPageIndex, ExampleLanguage)
End Get
winforms-spreadsheet-pivot-table-api/VB/SpreadsheetPivotTableExamples/Form1.vb#L119
Get
Return CType(xtraTabControl1.SelectedTabPageIndex, ExampleLanguage)
End Get
winforms-richeditcontrol-common-api/VB/RichEditAPISample/Form1.vb#L397
Get
Return CType(xtraTabControl1.SelectedTabPageIndex, ExampleLanguage)
End Get
spreadsheet-document-api-examples-part2/VB/SpreadsheetDocServerAPIPart2/Form1.vb#L80
Get
Return CType(xtraTabControl1.SelectedTabPageIndex, ExampleLanguage)
End Get
spreadsheet-document-api-pivot-table-examples/VB/SpreadsheetDocServerPivotAPI/Form1.vb#L92
Get
Return CType(xtraTabControl1.SelectedTabPageIndex, ExampleLanguage)
End Get
See Also