/// <summary> /// Tabs_MouseUp - Handle mouse right-click operations /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Tabs_MouseUp(object sender, MouseEventArgs e) { Point mousePosition = Control.MousePosition; if (e.Button == MouseButtons.Right) { XtraTabHitInfo hitInfo = Tabs.CalcHitInfo(new Point(e.X, e.Y)); if (hitInfo.HitTest == XtraTabHitTest.PageHeader) { XtraTabPage tp = hitInfo.Page; string tabName = (tp.Tag != null) ? tp.Tag.ToString() : ""; if (tabName == "AddNewTab") { return; } else // show the ResultsPage menu { int x = Cursor.Position.X; int y = Cursor.Position.Y; Point p = new Point(x, y); p = this.PointToClient(p); PageContextMenu.Show(this, p); } } } }
/// <summary> /// Show the page context menu /// </summary> /// <param name="sender"></param> /// <param name="e"></param> internal void WindowLayoutButton_Click(object sender, EventArgs e) { SimpleButton b = sender as SimpleButton; if (b == null) { return; } PageContextMenu.Show(b, new System.Drawing.Point(0, b.Height)); }