Keyoti RapidSpell Desktop .NET API Docs
SpellContextMenuRequest Event
APIKeyoti.RapidSpellRapidSpellAsYouTypeSpellContextMenuRequest
Keyoti RapidSpell Desktop .NET
Fired when a request is made (usually by a right click on an underlined word) for context menu
Declaration Syntax
C#Visual BasicVisual C++F#
public event SpellContextMenuRequestEventHandler SpellContextMenuRequest
Public Event SpellContextMenuRequest As SpellContextMenuRequestEventHandler
public:
 event SpellContextMenuRequestEventHandler^ SpellContextMenuRequest {
	void add (SpellContextMenuRequestEventHandler^ value);
	void remove (SpellContextMenuRequestEventHandler^ value);
}
member SpellContextMenuRequest : IEvent<SpellContextMenuRequestEventHandler,
    SpellContextMenuEventArgs>
Value
Remarks
This event is a good way to display the spelling context menu in a developers own context menu. Setting ShowSuggestionsContextMenu to false will deactivate the automatic context menu that appears when a user right clicks on a spelling error. Listeners to this event are notified when a context menu should be shown with spelling suggestions and options, the event args also include a collection of MenuItem objects with spelling suggestions and Ignore All & Add options; These menu item click events are already hooked into RapidSpellAsYouType and will function as expected, without further programming.
Examples
Handling the context menu in a custom fashion.
 Copy imageCopy
.....
private Keyoti.RapidSpell.AYTRichTextBox aytRichTextBox1;
private Keyoti.RapidSpell.RapidSpellAsYouType rapidSpellAsYouType1;
.....

private void InitializeComponent(){
    .....
    this.rapidSpellAsYouType1.SpellContextMenuRequest += 
        new RapidSpellAsYouType.SpellContextMenuRequestEventHandler(rapidSpellAsYouType1_SpellContextMenuRequest);
    .....        
}

private void rapidSpellAsYouType1_SpellContextMenuRequest(object sender, Keyoti.RapidSpell.Event.SpellContextMenuEventArgs e)
{
    //The MenuItem objects in e.MenuItems can be added to any menu as desired.
    this.aytRichTextBox1.ContextMenu.MenuItems.AddRange((MenuItem[])e.MenuItems);
}
....

Assembly: Keyoti.RapidSpell.NET2 (Module: Keyoti.RapidSpell.NET2.dll) Version: 4.6.1.204