This example creates a custom tab control that can display buttons in tab headers.
Use the XtraTabPageDescendant.CustomButtons
property to access tab header buttons:
xtraTabPageDescendant1.CustomButtons.Add(new CustomHeaderButton() { Kind = ButtonPredefines.Plus });
The XtraTabPageDescendant.CustomPageButtonClick
event allows you to handle button clicks:
private void xtraTabControlDescendant1_CustomHeaderButtonClick(object sender, CustomHeaderButtonEventArgs e) {
XtraTabControlDescendant xtraTab = sender as XtraTabControlDescendant;
MessageBox.Show(string.Format("TabName {0}, click on button {1} kind {2}", xtraTab.Name, e.Button.Index, e.Button.Kind));
}
- BaseTabHandlerDescendant.cs (VB: BaseTabHandlerDescendant.vb)
- Form1.cs (VB: Form1.vb)
- SkinTabPainterDescendant.cs (VB: SkinTabPainterDescendant.vb)
- XtraTabPageCollectionDescendant.cs (VB: XtraTabPageCollectionDescendant.vb)
- XtraTabPageDescendant.cs (VB: XtraTabPageDescendant.vb)
- XtraTabControlDescendant.cs (VB: XtraTabControlDescendant.vb)
- BaseTabPageViewInfoDescendant.cs (VB: BaseTabPageViewInfoDescendant.vb)
- SkinViewInfoRegistratorDescendant.cs (VB: SkinViewInfoRegistratorDescendant.vb)
- SkinTabHeaderViewInfoDescendant.cs (VB: SkinTabHeaderViewInfoDescendant.vb)
- TabButtonsPanelDescendant.cs (VB: TabButtonsPanelDescendant.vb)
(you will be redirected to DevExpress.com to submit your response)