Infragistics(R) NetAdvantage(R) : WPF 2012.1
How to Specify Text to be Spell Checked
E-mail your feedback on this topic.
Shared XAML > Editors > xamSpellChecker > Using xamSpellChecker > How to Specify Text to be Spell Checked

Glossary Item Box

The xamSpellChecker control allows you to spell check single or multiple controls within your application. This can be achieved by creating a binding to the input control and then adding this binding to the SpellCheckTargets collection. You can add as many bindings as you want to the collection and the spelling errors for each input control will appear in a spell checker dialog user interface.

The following code demonstrates how to add a Binding element to the SpellCheckerTargets collection.


<Grid x:Name="LayoutRoot">
   <ig:XamSpellChecker x:Name="spellChecker">
         <!-- Where txtSpellCheck in the name of the input control -->
         <Binding ElementName="txtSpellCheck" Path="Text" Mode="TwoWay" NotifyOnValidationError="True" ValidatesOnExceptions="True"></Binding>          

In Visual Basic:

Imports Infragistics.Controls.Interactions
Imports Infragistics
Imports System.Windows.Data
Dim spellChecker As New XamSpellChecker()
Dim spellBinding As New Binding()
spellBinding.Mode = BindingMode.TwoWay

Dim propPathSpellBinding As New PropertyPath("Text")
spellBinding.Path = propPathSpellBinding

' Specifies the input control to be spell checked.
spellBinding.Source = txtSpellCheck


In C#:

using Infragistics.Controls.Interactions;
using Infragistics;
using System.Windows.Data;
XamSpellChecker spellChecker = new XamSpellChecker();
Binding spellBinding = new Binding();
spellBinding.Mode = BindingMode.TwoWay;

PropertyPath propPathSpellBinding = new PropertyPath("Text");
spellBinding.Path = propPathSpellBinding;

// Specifies the input control to be spell checked.
spellBinding.Source = txtSpellCheck;


Related Topics


Performance Options

Spelling Options