Custom dictionary reset

2 posts, 1 answers
  1. Jason
    Jason avatar
    18 posts
    Member since:
    Aug 2014

    Posted 17 Aug 2014 Link to this post

    When I import text into my rich text control (2014.2.715), the custom dictionary is lost.

    I'm using the following code:
    var provider = new RtfFormatProvider();
    rtf.Document = provider.Import(value);

    I'm using the following to set my custom dictionary:
    var culture = CultureInfo.GetCultureInfo("en-AU");
    var checker = (DocumentSpellChecker)rtf.SpellChecker;
    if (!(checker.GetDictionary(culture) is AustralianDictionary))
    checker.AddDictionary(new AustralianDictionary(), culture);
    rtf.SpellChecker.SpellCheckingCulture = culture;

    Am I doing something wrong?  What is the correct way to set a custom dictionary?

  2. Answer
    Dimitar avatar
    2105 posts

    Posted 20 Aug 2014 Link to this post

    Hello Jason,

    Thank you for writing.

    In this case this is how the rich text box is constructed. Your approach is correct, but you should set the custom dictionary after the document is imported. This is the current default behavior and we will consider to change it in a future release.

    Do not hesitate to contact us if you have other questions.
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Back to Top