Adding and removing words from the user dictionary

In order to edit user dictionaries, the UserDictionary.IsEditable property must be set to true. This sample consists of a simple interface to add and remove words to and from the user dictionary. A ListBox is synchronized to show the content of the user dictionary. The following code is used to add a word to the user dictionary using the UserDictionary.AddWord method.

[C#]
userDic.AddWord(tbNewWord.Text);
[Visual Basic]
userDic.AddWord(tbNewWord.Text)

To remove a word from the user dictionary, the UserDictionary.RemoveWord method is used:

[C#]
userDic.RemoveWord(listBox1.Text);
[Visual Basic]
userDic.RemoveWord(listBox1.Text)

The following screenshot shows the interface of the sample application: