# C1.WPF.SpellChecker.UserDictionary.SaveToIsolatedStorage

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_SpellChecker_UserDictionary_SaveToIsolatedStorage_" data-uid="C1.WPF.SpellChecker.UserDictionary.SaveToIsolatedStorage*">SaveToIsolatedStorage Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_SpellChecker_UserDictionary_SaveToIsolatedStorage_" data-uid="C1.WPF.SpellChecker.UserDictionary.SaveToIsolatedStorage*"></a>
<h4 id="C1_WPF_SpellChecker_UserDictionary_SaveToIsolatedStorage_System_String_System_IO_IsolatedStorage_IsolatedStorageScope_System_Type_System_Type_" data-uid="C1.WPF.SpellChecker.UserDictionary.SaveToIsolatedStorage(System.String,System.IO.IsolatedStorage.IsolatedStorageScope,System.Type,System.Type)">SaveToIsolatedStorage(string, IsolatedStorageScope, Type, Type)</h4>
<div class="markdown level1 summary"><p>Saves the dictionary into a compressed file in isolated storage.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SaveToIsolatedStorage(string fileName, IsolatedStorageScope scope = IsolatedStorageScope.User | IsolatedStorageScope.Domain | IsolatedStorageScope.Assembly, Type domainEvidenceType = null, Type assemblyEvidenceType = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SaveToIsolatedStorage(fileName As String, Optional scope As IsolatedStorageScope = IsolatedStorageScope.User Or IsolatedStorageScope.Domain Or IsolatedStorageScope.Assembly, Optional domainEvidenceType As Type = Nothing, Optional assemblyEvidenceType As Type = Nothing)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">fileName</span></td>
      <td><p>Name of the file to save.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.isolatedstorage.isolatedstoragescope">IsolatedStorageScope</a></td>
      <td><span class="parametername">scope</span></td>
      <td><p>Isolated storage scope</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a></td>
      <td><span class="parametername">domainEvidenceType</span></td>
      <td><p>Domain evidence type</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a></td>
      <td><span class="parametername">assemblyEvidenceType</span></td>
      <td><p>Assembly evidence type</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_SpellChecker_UserDictionary_SaveToIsolatedStorage_System_String_System_IO_IsolatedStorage_IsolatedStorageScope_System_Type_System_Type__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method is used to save user dictionaries that were modified
during the spell checking process. It is normally invoked only once,
before the applications exits.</p>
</div>
<h5 id="C1_WPF_SpellChecker_UserDictionary_SaveToIsolatedStorage_System_String_System_IO_IsolatedStorage_IsolatedStorageScope_System_Type_System_Type__examples">Examples</h5>
<pre><code class="lang-csharp">public Page()
{
  InitializeComponent();

  // load user dictionary
  UserDictionary ud = c1SpellChecker1.UserDictionary;
  ud.LoadFromIsolatedStorage("Custom.dct");

  // save user dictionary when app exits
  App.Current.Exit += App_Exit; 
}
void App_Exit(object sender, EventArgs e)
{
  // save modified user dictionary
  UserDictionary ud = c1SpellChecker1.UserDictionary;
  ud.SaveToIsolatedStorage("Custom.dct");
}</code></pre>

</div>
