Back to Devexpress

XtraTabPage.PageVisible Property

windowsforms-devexpress-dot-xtratab-dot-xtratabpage-307b2acd.md

latest2.1 KB
Original Source

XtraTabPage.PageVisible Property

Gets or sets whether the tab page is visible.

Namespace : DevExpress.XtraTab

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

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

Property Value

TypeDefaultDescription
Booleantrue

true if the tab page is visible; otherwise, false.

|

Example

The following example shows how to hide tab pages in the XtraTabControl when their Close buttons are clicked. To respond to clicking Close buttons, the XtraTabControl.CloseButtonClick event is handled.

csharp
using DevExpress.XtraTab;
using DevExpress.XtraTab.ViewInfo;

private void xtraTabControl1_CloseButtonClick(object sender, EventArgs e) {
    ClosePageButtonEventArgs arg = e as ClosePageButtonEventArgs;
    (arg.Page as XtraTabPage).PageVisible = false;
}
vb
Imports DevExpress.XtraTab
Imports DevExpress.XtraTab.ViewInfo

Private Sub XtraTabControl1_CloseButtonClick(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles XtraTabControl1.CloseButtonClick
    Dim arg As ClosePageButtonEventArgs = TryCast(e, ClosePageButtonEventArgs)
    TryCast(arg.Page, XtraTabPage).PageVisible = False
End Sub

See Also

XtraTabPage Class

XtraTabPage Members

DevExpress.XtraTab Namespace