[]
        
(Showing Draft Content)

C1.Win.C1SpellChecker.C1SpellChecker.ShowSuggestions

ShowSuggestions Event

Occurs when suggestions is about to show in the spell dialog or in the spell context menu.

Namespace: C1.Win.C1SpellChecker
Assembly: C1.Win.C1SpellChecker.4.8.dll
Syntax
public event SuggestionsEventHandler ShowSuggestions
Returns
Type Description
SuggestionsEventHandler Occurs when suggestions is about to show in the spell dialog or in the spell context menu.
Remarks

Use this method to customize the suggestion list. Suggestions can be added, removed or rearranged.

If the suggestion list contains more items than MaxSuggestionsInContextMenu, then the additional items won't be shown in the spell context menu.

This event does not occur when user calls GetSuggestions(string, int) method.

Examples

This example checks the misspelled word and inserts one or more suggestions at the top of the list if need.

private void c1SpellChecker1_ShowSuggestions(object sender, C1.Win.C1SpellChecker.SuggestionsEventArgs e)
{
   if (e.Word.StartsWith("o"))
       e.Suggestions.Insert(0, "one new suggestion");
   if (e.Word.Contains("i"))
       e.Suggestions.Insert(0, "is suggestion");
   if (e.Word.StartsWith("tex"))
       e.Suggestions.Insert(0, "text suggestion");
}