windowsforms-devexpress-dot-xtratab-dot-xtratabpage-bc5b6470.md
Gets or sets whether a tab page can be selected.
Namespace : DevExpress.XtraTab
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DefaultValue(true)]
public virtual bool PageEnabled { get; set; }
<DefaultValue(True)>
Public Overridable Property PageEnabled As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | true |
true if a tab page is enabled and can be selected by an end-user or via code; otherwise, false.
|
Use the PageEnabled property to temporarily disable the current tab page. A disabled page cannot be selected by an end-user or via code, its header is displayed grayed as shown in the image below.
The following code snippets (auto-collected from DevExpress Examples) contain references to the PageEnabled 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#L473
if (examplesCSCount == 0)
xtraTabControl1.TabPages[(int)ExampleLanguage.Csharp].PageEnabled = false;
if (examplesVBCount == 0)
winforms-spreadsheet-pivot-table-api/CS/SpreadsheetPivotTableExamples/Form1.cs#L468
if (examplesCSCount == 0)
xtraTabControl1.TabPages[(int)ExampleLanguage.Csharp].PageEnabled = false;
if (examplesVBCount == 0)
winforms-spreadsheetcontrol-api-part-3/CS/SpreadsheetControl_API_Part03/Form1.cs#L423
if (examplesCSCount == 0)
foreach (XtraTabPage t in xtraTabControl1.TabPages) if (t.Tag.ToString() == "CS") t.PageEnabled = false;
if (examplesVBCount == 0)
winforms-richeditcontrol-common-api/CS/RichEditAPISample/Form1.cs#L3452
if(examplesCSCount == 0)
xtraTabControl1.TabPages[(int)ExampleLanguage.Csharp].PageEnabled = false;
if(examplesVBCount == 0)
winforms-richedit-document-api/CS/RichEditAPISample/Form1.cs#L528
if (examplesCSCount == 0)
foreach (XtraTabPage t in xtraTabControl1.TabPages) if (t.Tag.ToString() == "CS") t.PageEnabled = false;
if (examplesVBCount == 0)
winforms-spreadsheet-chart-api/VB/SpreadsheetChartAPISamples/Form1.vb#L412
If examplesCSCount = 0 Then
xtraTabControl1.TabPages(CInt(Fix(ExampleLanguage.Csharp))).PageEnabled = False
End If
winforms-spreadsheet-pivot-table-api/VB/SpreadsheetPivotTableExamples/Form1.vb#L445
If examplesCSCount = 0 Then
xtraTabControl1.TabPages(CInt(ExampleLanguage.Csharp)).PageEnabled = False
End If
winforms-spreadsheetcontrol-api-part-3/VB/SpreadsheetControl_API_Part03/Form1.vb#L402
For Each t As XtraTabPage In xtraTabControl1.TabPages
If Equals(t.Tag.ToString(), "CS") Then t.PageEnabled = False
Next
winforms-richeditcontrol-common-api/VB/RichEditAPISample/Form1.vb#L2894
If examplesCSCount = 0 Then
xtraTabControl1.TabPages(CInt(Fix(ExampleLanguage.Csharp))).PageEnabled = False
End If
winforms-richedit-document-api/VB/RichEditAPISample/Form1.vb#L505
For Each t As XtraTabPage In xtraTabControl1.TabPages
If Equals(t.Tag.ToString(), "CS") Then t.PageEnabled = False
Next
See Also