Last Updated: 08 Jan 2016 06:31 by ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 12 Nov 2015 07:28
Category: RichTextEditor
Type: Bug Report
FIX. RadRichTextEditor - SpellCheckingDialog should not be closed when a misspelled word is added to dictionary
Note: it should be closed automatically when all words are corrected.

To reproduce:

1. Enter some misspelled words and open the context menu with right mouse click.
2. Show the SpellCheckingDialog.
3. Add a word to the dictionary. The SpellCheckingDialog will be closed immediately. However, if you press to ignore the word/words, the dialog remains opened.

Workaround: cancel the SpellCheckingDialog.FormClosing event except when the close button is clicked:
public Form1()
    this.radRichTextEditor1.IsSpellCheckingEnabled = true;
    RadButton buttonClose = ((SpellCheckingDialog)this.radRichTextEditor1.RichTextBoxElement.SpellCheckingDialog).Controls["buttonClose"] as RadButton;

    buttonClose.MouseDown += buttonClose_MouseDown;
    ((SpellCheckingDialog)this.radRichTextEditor1.RichTextBoxElement.SpellCheckingDialog).FormClosing += SpellCheckingDialog_FormClosing;

bool shouldClose = false;

private void buttonClose_MouseDown(object sender, MouseEventArgs e)
    shouldClose = true;

private void SpellCheckingDialog_FormClosing(object sender, FormClosingEventArgs e)
    if (e.CloseReason != CloseReason.FormOwnerClosing)
        e.Cancel = !shouldClose;
        shouldClose = false;