# C1.Win.SpellChecker.C1SpellChecker.AutoReplaceList

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_SpellChecker_C1SpellChecker_AutoReplaceList_" data-uid="C1.Win.SpellChecker.C1SpellChecker.AutoReplaceList*">AutoReplaceList Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_SpellChecker_C1SpellChecker_AutoReplaceList_" data-uid="C1.Win.SpellChecker.C1SpellChecker.AutoReplaceList*"></a>
<h4 id="C1_Win_SpellChecker_C1SpellChecker_AutoReplaceList" data-uid="C1.Win.SpellChecker.C1SpellChecker.AutoReplaceList">AutoReplaceList</h4>
<div class="markdown level1 summary"><p>Gets a list of words and replacements to use while spell-checking.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Browsable(false)]
public WordDictionary AutoReplaceList { get; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Browsable(False)&gt;
Public ReadOnly Property AutoReplaceList As WordDictionary</code></pre>
</div>
<h5 id="C1_Win_SpellChecker_C1SpellChecker_AutoReplaceList_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This list is used by the built-in spell dialog and by the as-you-type mechanism.</p>
<p>The built-in spell dialog checks the list when it finds a misspelled word. If a match
is found, the misspelled word is replaced with the corresponding list entry.</p>
<p>The as-you-type mechanism looks for matches whenever the user types a character that
is not a letter or a digit. If a match is found, the text is replaced with the corresponding
list entry.</p>
<p>Note the difference in operation between the two modes. In as-you-type spell-checking,
any matches will be replaced, whether the key is spelled correctly or not. In dialog mode,
keys that are spelled correctly will not be flagged as errors and therefore will not be 
replaced. For example, if the <b>AutoReplaceList</b> contains an entry with the strings
("attn.", "attention of"), then typing "attn. " into the editor will trigger a replacement 
and the editor will contain "attention of ". However, because "attn." is not a spelling 
error, the spell dialog will not replace instances of the string "attn." with "attention of".</p>
<p>The <a class="xref" href="C1.Win.SpellChecker.C1SpellChecker.html">C1SpellChecker</a> raises the <a class="xref" href="C1.Win.SpellChecker.C1SpellChecker.AutoReplace.html">AutoReplace</a> event before
making each automatic replacement. The event handler may cancel the replacement.</p>
<p>Strings in the list are case-sensitive.</p>
</div>
<h5 id="C1_Win_SpellChecker_C1SpellChecker_AutoReplaceList_examples">Examples</h5>
<p>The example below causes the <a class="xref" href="C1.Win.SpellChecker.C1SpellChecker.html">C1SpellChecker</a> to monitor spelling on a
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.textbox">TextBox</a> control. If the user types the string &quot;teh&quot;, it is automatically
replaced with &quot;the&quot;. If the user types &quot;cant&quot;, it is automatically replaced with &quot;can't&quot;.</p>
<pre><code class="lang-csharp">// build AutoReplace list
c1SpellChecker1.AutoReplaceList.Clear();
c1SpellChecker1.AutoReplaceList.Add("teh", "the");
c1SpellChecker1.AutoReplaceList.Add("cant", "can't");

// activate as-you-type spell-checking on textBox1
c1SpellChecker1.SetSpellChecking(textBox1, true);</code></pre>

</div>
