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

5 posts, 1 answers
  1. Frank
    Frank avatar
    8 posts
    Member since:
    Mar 2011

    Posted 11 Apr 2011 Link to this post

    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
  2. Answer
    Boby
    Admin
    Boby avatar
    595 posts

    Posted 14 Apr 2011 Link to this post

    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
  3. DevCraft banner
  4. Frank
    Frank avatar
    8 posts
    Member since:
    Mar 2011

    Posted 14 Apr 2011 Link to this post

    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
  5. Andrew
    Admin
    Andrew avatar
    140 posts

    Posted 15 Apr 2011 Link to this post

    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
  6. Pablo
    Pablo avatar
    7 posts
    Member since:
    May 2013

    Posted 28 Jun 2013 Link to this post

    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
Back to Top
DevCraft banner