TXTextControl.WPF.TextControl.SpellChecker Property

Specifies the spell checking component to be used with a TextControl. The property value must be the key of a resource added to the Resources dictionary of a TextControl or a parent of a TextControl in the logical element tree of the application. The resource key must be a string. Specifying an empty string, a connected spellchecker can be disconnected. When a spell checking component is connected and the IsSpellCheckingEnabled property has been set to true, misspelled words are automatically underlined with a red zigzag line. The SpellCheckDialog method can be used to correct the misspelled words contained in the document. When a spell checking component is connected and the IsHyphenationEnabled property has been set to true, a document is automatically hyphenated. If the IsLanguageDetectionEnabled property has been set to true, a language is automatically detected for all text parts with a neutral language.

Introduced: 17.0.

Syntax

[C#]
public string SpellChecker { get; set; }
[Visual Basic]
Public Property SpellChecker() As String

Example

The following XAML example shows how to add a TXSpellChecker component to the Resources dictionary of a TextControl:

<Window xmlns:tx="clr-namespace:TXTextControl.WPF;assembly=TXTextControl.WPF"
    xmlns:txspell="clr-namespace:TXTextControl.WPF.Proofing;assembly=TXSpell.WPF">
  <tx:TextControl Name="textControl1">
    <tx:TextControl.Resources>
      <txspell:TXSpellChecker x:Key="txspellChecker1"/>
    </tx:TextControl.Resources>
  </tx:TextControl>
</Window>

See Also