RichTextBox for WPF | ComponentOne
C1.WPF.SpellChecker Namespace / UserDictionary Class / SaveToIsolatedStorage Method
Name of the file to save.
Isolated storage scope
Domain evidence type
Assembly evidence type
Example

In This Topic
    SaveToIsolatedStorage Method (UserDictionary)
    In This Topic
    Saves the dictionary into a compressed file in isolated storage.
    Syntax
    'Declaration
     
    
    Public Sub SaveToIsolatedStorage( _
       ByVal fileName As String, _
       Optional ByVal scope As IsolatedStorageScope, _
       Optional ByVal domainEvidenceType As Type, _
       Optional ByVal assemblyEvidenceType As Type _
    ) 

    Parameters

    fileName
    Name of the file to save.
    scope
    Isolated storage scope
    domainEvidenceType
    Domain evidence type
    assemblyEvidenceType
    Assembly evidence type
    Remarks
    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.
    Example
    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");
    }
    See Also