Skip to main content

SpellChecker.PrepareContextMenu Event

OBSOLETE

You should use the 'PopupMenuShowing' instead

Occurs before a context menu is created.

Namespace: DevExpress.XtraSpellChecker

Assembly: DevExpress.XtraSpellChecker.v24.2.dll

Declaration

[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("You should use the 'PopupMenuShowing' instead", true)]
public event PrepareContextMenuEventHandler PrepareContextMenu

Event Data

The PrepareContextMenu event's data class is DevExpress.XtraSpellChecker.PrepareContextMenuEventArgs.

Remarks

Handle this event to add new menu items to the context menu, or to modify existing items. The following code snippet illustrates how to use this event to add a “Clear All” menu item that deletes all text in the text editor.

spellChecker1.PrepareContextMenu += 
    new PrepareContextMenuEventHandler(spellChecker1_PrepareContextMenu);
 void spellChecker1_PrepareContextMenu(object sender, PrepareContextMenuEventArgs e) {
    e.Menu.Items.Add(new DXMenuItem("Clear All", OnClearMenuItemClick));
}
void OnClearMenuItemClick(object sender, EventArgs e) {
    this.textEdit1.Text = String.Empty;
}
See Also