Spell-Checking Different Types of Controls

SpellChecker for Silverlight can be used to spell check any control that contains text. This support is built-in for the C1RichTextBox and Microsoft TextBox controls. To spell-check other controls, you need to provide a wrapper class that implements the ISpellCheckableEditor interface.

For example, the "SpellCheckerSample" shows how you can spell-check a DataGrid control. It does this by creating a class called DataGridSpellWrapper that implements the ISpellCheckableEditor interface on behalf of the grid. The wrapper class enumerates the grid cells and exposes the text in each cell to the C1SpellCheckercomponent. When an error is found, the cell is selected and the spell dialog box shows the error and suggestions as usual. The image below illustrates what the SpellCheckerSample sample looks like while spell-checking a DataGrid:

 


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.