Back to Devexpress

XtraTabPage.PageEnabled Property

windowsforms-devexpress-dot-xtratab-dot-xtratabpage-bc5b6470.md

latest5.7 KB
Original Source

XtraTabPage.PageEnabled Property

Gets or sets whether a tab page can be selected.

Namespace : DevExpress.XtraTab

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(true)]
public virtual bool PageEnabled { get; set; }
vb
<DefaultValue(True)>
Public Overridable Property PageEnabled As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true if a tab page is enabled and can be selected by an end-user or via code; otherwise, false.

|

Remarks

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

csharp
if (examplesCSCount == 0)
    xtraTabControl1.TabPages[(int)ExampleLanguage.Csharp].PageEnabled = false;
if (examplesVBCount == 0)

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

csharp
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

csharp
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

csharp
if(examplesCSCount == 0)
    xtraTabControl1.TabPages[(int)ExampleLanguage.Csharp].PageEnabled = false;
if(examplesVBCount == 0)

winforms-richedit-document-api/CS/RichEditAPISample/Form1.cs#L528

csharp
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

vb
If examplesCSCount = 0 Then
    xtraTabControl1.TabPages(CInt(Fix(ExampleLanguage.Csharp))).PageEnabled = False
End If

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

vb
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

vb
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

vb
If examplesCSCount = 0 Then
    xtraTabControl1.TabPages(CInt(Fix(ExampleLanguage.Csharp))).PageEnabled = False
End If

winforms-richedit-document-api/VB/RichEditAPISample/Form1.vb#L505

vb
For Each t As XtraTabPage In xtraTabControl1.TabPages
    If Equals(t.Tag.ToString(), "CS") Then t.PageEnabled = False
Next

See Also

XtraTabPage Class

XtraTabPage Members

DevExpress.XtraTab Namespace