//NEW EVENT void OnTabHeaderPopupMenuShowing(object sender, PopupMenuShowingEventArgs e) { if (e.TabPage.Text.EndsWith("0")) { e.Menu.Items.Add(new DXMenuItem("Item 0")); } if (e.TabPage.Text.EndsWith("1")) { e.Menu.Items.Add(new DXMenuItem("Item 1")); } if (e.TabPage.Text.EndsWith("2")) { e.Menu.Items.Add(new DXMenuItem("Item 2")); } }
void OnManagerMouseUp(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.Right) { return; } BaseTabHitInfo hi = managerCore.CalcHitInfo(new Point(e.X, e.Y)); if (hi.HitTest == XtraTabHitTest.PageHeader) { Menu.Items.Clear(); PopupMenuShowingEventArgs args = new PopupMenuShowingEventArgs(hi.Page) { Menu = Menu }; RaisePopupMenuShowing(args); ((IDXDropDownControl)Menu).Show(new SkinMenuManager(DevExpress.LookAndFeel.UserLookAndFeel.Default.ActiveLookAndFeel), managerCore.MdiParent.ActiveMdiChild, e.Location); } }