void richEdit1_Loaded(object sender, RoutedEventArgs e)
        {
            DevExpress.Xpf.SpellChecker.SpellChecker spellChecker = SpellCheckerHelper.SpellChecker;
            spellChecker.SpellCheckMode = SpellCheckMode.AsYouType;

            SpellCheckerOpenOfficeDictionary dictionary = LoadGreekDictionary();

            SpellCheckerHelper.SpellChecker.Dictionaries.Add(dictionary);
            SpellCheckerHelper.SpellChecker.Culture = dictionary.Culture;

            this.richEdit1.SpellChecker = spellChecker;
        }
Beispiel #2
0
 static DevExpress.Xpf.SpellChecker.SpellChecker CreateSpellChecker()
 {
     SpellCheckTextControllersManager.Default.RegisterClass(typeof(RichEditControl), typeof(RichEditSpellCheckController));
     DevExpress.Xpf.SpellChecker.SpellChecker spellChecker = new DevExpress.Xpf.SpellChecker.SpellChecker();
     spellChecker.Culture = new CultureInfo("en-US");
     try {
         RegisterDictionary(spellChecker, GetDefaultDictionary());
         RegisterDictionary(spellChecker, GetCustomDictionary(spellChecker));
     }
     catch {
     }
     return(spellChecker);
 }
Beispiel #3
0
 static SpellCheckerDictionaryBase GetCustomDictionary(DevExpress.Xpf.SpellChecker.SpellChecker spellChecker)
 {
     return(new SpellCheckerCustomDictionary("CustomEnglish.dic", spellChecker.Culture));
 }
Beispiel #4
0
 static void RegisterDictionary(DevExpress.Xpf.SpellChecker.SpellChecker spellChecker, SpellCheckerDictionaryBase dic)
 {
     dic.Culture = spellChecker.Culture;
     spellChecker.Dictionaries.Add(dic);
 }