RichTextBox for WPF and Silverlight Quick Start > Step 2: Adding Spell-Check Functionality |
In the previous step, you created a new application and added the RichTextBox and RichTextBoxToolbar controls to the application. If you currently click the Spell Check button in the toolbar at runtime, you receive a message that spell checking is currently not set up. In this step, you customize the application further and add spell-checking functionality to the application.
To add spell checking to the application, complete the following steps:
Imports C1.WPF.RichTextBox Imports C1.WPF.SpellChecker
using C1.WPF.RichTextBox; using C1.WPF.SpellChecker;
InitializeComponent() Dim spell = New C1SpellChecker() spell.MainDictionary.LoadAsync("C1Spell_en-US.dct") Me.c1RichTextBox1.SpellChecker = spell
InitializeComponent(); var spell = new C1SpellChecker(); spell.MainDictionary.LoadAsync("C1Spell_en-US.dct"); this.c1RichTextBox1.SpellChecker = spell;
Me.c1RichTextBox1.Text = "Hello World! Weelcome to the most complete rich text editor availible for WPF. Load, edit, and save formattted text as HTML or RTF documents with ComponentOne RichTextBox for WPF. The C1RichTextBox control provids rich formatting, automatic line wrapping, HTML and RTF import/export, table support, images, anotations, and more."
this.c1RichTextBox1.Text = "Hello World! Weelcome to the most complete rich text editor availible for WPF. Load, edit, and save formattted text as HTML or RTF documents with ComponentOne RichTextBox for WPF. The C1RichTextBox control provids rich formatting, automatic line wrapping, HTML and RTF import/export, table support, images, anotations, and more.";