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.
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;
}
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