This is a migrated thread and some comments may be shown as answers.

How to remove the "Add to Dictionary" button from spell checking popup

4 Answers 86 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 11 Apr 2011, 04:48 PM
Hi,
I would like to know if there is some way to remove the "Add to Dictionary" button from the  spell checking popup without re-styling the popup with XAML template without the button.
I don't know if there is some property buried somewhere that allows to do that.

Thanks,
Frank

4 Answers, 1 is accepted

Sort by
0
Accepted
Boby
Telerik team
answered on 14 Apr 2011, 09:53 AM
Hi Frank,

The easiest way to remove the button will be to find the button by its name and hide it:

public MainPage()
{
    InitializeComponent();
 
    SpellCheckingDialog spellCheckingDialog = this.radRichTextBox1.SpellCheckingDialog as SpellCheckingDialog;
    if (spellCheckingDialog != null)
    {
        spellCheckingDialog.Loaded += this.SpellCheckingDialog_Loaded;
    }
}
 
private void SpellCheckingDialog_Loaded(object sender, RoutedEventArgs e)
{
    SpellCheckingDialog spellCheckingDialog = (SpellCheckingDialog)this.radRichTextBox1.SpellCheckingDialog;
 
    Button buttonAddToDictionary = (Button)spellCheckingDialog.FindName("buttonAddToDictionary");
    buttonAddToDictionary.Visibility = Visibility.Collapsed;
    spellCheckingDialog.Loaded -= this.SpellCheckingDialog_Loaded;
}
Another option will be to create your own implementation of SpellCheckingDialog, inheriting the default one, and do something similar in it. In this case you should mark it with CustomSpellCheckingDialogAttribute in order for MEF to load the new dialog and display it instead of the default one.

Don't hesitate to contact us if you have other questions.

All the best,
Boby
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Frank
Top achievements
Rank 1
answered on 14 Apr 2011, 08:29 PM
Thanks Boby,
that was exactly was I was looking for.

Do you know how I can achieve the same result using your static class: RadSpellChecker ?
How can I get the instance of the spell checking dialog that the static class is using?

Thanks,
Frank
0
Andrew
Telerik team
answered on 15 Apr 2011, 09:34 AM
Hi Frank,

We are glad we could help you. Now to your second question. Currently RadSpellChecker doesn't support modification of its pop-up dialogs, except the ones exposed in RadSpellChecker.WindowSettings property. There you can find properties regarding window's position and theme. In the future we will expand the available properties.

If you have other questions or concerns, do not hesitate to contact us again.

Best wishes,
Andrew
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Pablo
Top achievements
Rank 1
answered on 28 Jun 2013, 08:42 PM
Hi, I'm trying to build my own custom SpellCheckingDialog for a RadRichTextBox, is there any guide you could give me please. I'd be trully grafeful.

Thanks in advance
Tags
RichTextBox
Asked by
Frank
Top achievements
Rank 1
Answers by
Boby
Telerik team
Frank
Top achievements
Rank 1
Andrew
Telerik team
Pablo
Top achievements
Rank 1
Share this question
or