Batch Mode
The CheckText, CheckWord, and GetSuggestions methods check strings and get lists of errors and provide spelling suggestions. You can use these methods to spell check text that is not in a control. For example, you could spell-check text that is stored in a database.
The code below illustrates this mode:
// Check some text
var someText = "this text comtains two errrors.";
var errors = c1SpellChecker1.CheckText(someText);
Debug.WriteLine("CheckText(\"{0}\") =", someText);
foreach (var error in errors)
{
Debug.WriteLine("\t{0}, {1}-{2}",
error.Text, error.Start, error.Length);
foreach (string suggestion in
c1SpellChecker1.GetSuggestions(error.Text, 1000))
{
Debug.WriteLine("\t\t{0}?", suggestion);
}
}