To cancel the DevExpress CM, attach a handler to XtraBars.QueryShowPopupMenu event, and selectively cancel the DevExpress menu. eg. private void QueryShowPopupMenu(Object sender, DevExpress.XtraBars.QueryShowPopupMenuEventArgs e) { MenuItems spellingSuggestions = rapidSpellAsYouType.GetSuggestions(); if(spellingSuggestions != null)//then the user right clicked on an error { //Create a new CM with the spelling suggestions, and show it System.Windows.Forms.ContextMenu cm = new System.Windows.Forms.ContextMenu(spellingSuggestions); cm.Show(textControl, textControl.PointToClient(e.Position)); //cancel the DevExpress menu e.Cancel = true; } }
|