Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

NuGet Package: DevExpress.Win.SpellChecker

#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