how to implement SpellChecker in a custom composite textbox ?

6 posts, 0 answers
  1. Tarun
    Tarun avatar
    32 posts
    Member since:
    Apr 2011

    Posted 19 Aug 2011 Link to this post

    Hi,

    We have created some custom controls in SilverLight (e.g a textbox and a button as one control).
    We wish to perform spell checking on this custom control.

    Can you provide us a sample application which says how to implement the spell checking in the custom controls (using RadSpellChecker).

    Thanks in advance.
  2. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 23 Aug 2011 Link to this post

    Hello Tarun,

    Since the only text that will be spell checked is the one in the text box, you can use the default TextBoxSpellChecker, as shown in this demo. Showing the spell-checking dialogs has to be done on button-click and you can choose between spell-checking word by word and spell-checking all at once. The code is as shown below:

    private void buttonCheckTextBox_Click(object sender, RoutedEventArgs e)
    {
        RadSpellChecker.Check(this.textBox, SpellCheckingMode.WordByWord);
    }
     
    private void buttonCheckAllTextBox_Click(object sender, RoutedEventArgs e)
    {
        RadSpellChecker.Check(this.textBox, SpellCheckingMode.AllAtOnce);
    }

    I hope this helps.

    Regards,
    Iva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft banner
  4. Tarun
    Tarun avatar
    32 posts
    Member since:
    Apr 2011

    Posted 24 Aug 2011 Link to this post

    Thanks Iva.

    I was trying the same thing with RadMaskedTextBox instead of just a TextBox.
    I guess...RadMaskedTextBox doesn't support spell check as of now.

    When i tried with the TextBox, I do get a spell check popup, but by default i dont see any suggestions coming up for me for any word.
    Did i miss something?

    Also, what do i need to do to support different culture (e.g English, Spanish, Italian, etc).
  5. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 26 Aug 2011 Link to this post

    Hello Tarun,

    Using RadSpellChecker with different cultures is illustrated in a demo in this forum thread. As long as you apply the modification to the App.xaml.cs - creating a new CompositionContainer for RadCompositionInitializer, as shown in on of the posts below - spell-checking in different languages will be performed correctly.
    As for RadMaskedTextBox, we will consider implementing a spell-checker for it, but it is not supported out of the box. You can try creating a spell checker for it on your end. More information on spell-checking custom controls can be found here.

    All the best,
    Iva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  6. Ly
    Ly avatar
    1 posts
    Member since:
    Oct 2011

    Posted 01 May 2013 Link to this post

    Is there a way to suppress (hide) or move the 'Spell checking' dialog to a different location after the spell check complete?  It is displayed in the center which in one of my application is behind my RadHtmlPlaceholder.
  7. Vasil
    Admin
    Vasil avatar
    124 posts

    Posted 06 May 2013 Link to this post

    Hi Ly,

    Thank you for your question.

    Unfortunately, I am not sure I understand the issue you describe. Do you mean that spell check competed message window is not displayed on top of the screen? Or may be the spell checking dialog is positioned behind another window? Could you please also elaborate a little bit more on your scenario, for example, what type of control is spell checked, what spell checking option is in use: WordByWord or AllAtOnce? Also, I kindly ask you to share the exact version of RadControls for Silverlight you are using.

    The best approach in such cases is to open a new support ticket and attach a demo project that replicates the issue you experience. Once we are able to observe and analyze the issue, we will do our best to provide you with solution.

    Looking forward to your reply.

    All the best,
    Vasil
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner