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

Adding Custom Dictionary

1 Answer 102 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Kotte
Top achievements
Rank 1
Kotte asked on 12 Oct 2011, 05:09 PM
Hi Telerik,

I am trying to add a custom dictionary to Rad Spell Check..

I created Test.txt file with few words and added to the project and loading to IsolatedStorage

IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication();          
isoStore.CreateDirectory("SpellCheck");
IsolatedStorageFileStream isoStream1 =  new IsolatedStorageFileStream("Test.txt", FileMode.Create, isoStore);
isoStream1.Close();


Creating the Custom Dictionary..
RadIsolatedStorageCustomDictionary dictionary = new RadIsolatedStorageCustomDictionary(IsolatedStorageScope.Application, "Test.txt");
DocumentSpellChecker spellchecker = new DocumentSpellChecker(dictionary);
this._richTextBox.SpellChecker = spellchecker;

Adding Dictionary
 Stream tdfFileStream = Application.GetResourceStream(new Uri("/MC.Client.Controls;component/Resources/en-US.tdf", UriKind.RelativeOrAbsolute)).Stream;
 RadDictionary dictionary1 = new RadDictionary();
 dictionary1.Load(tdfFileStream);
 ((DocumentSpellChecker)this._richTextBox.SpellChecker).AddDictionary(dictionary, CultureInfo.CurrentCulture);


its still showing the default dictionary and I did not find the words from Test.txt file.
Am I missing any thing.
Can some one please post a sample working project which loads custom dictionary file like (ex: CustomDictionary.txt )

Thanks.
Kotte.

1 Answer, 1 is accepted

Sort by
0
Kotte
Top achievements
Rank 1
answered on 13 Oct 2011, 04:10 PM
Hi,


I am able to fix the issue.Its working fine now.


Thanks,
Kotte
Tags
RichTextBox
Asked by
Kotte
Top achievements
Rank 1
Answers by
Kotte
Top achievements
Rank 1
Share this question
or