SpellCheckerBase.SaveToRegistry(String) Method
Serializes the spell checker object and saves the data into the registry.
Namespace: DevExpress.XtraSpellChecker
Assembly: DevExpress.SpellChecker.v21.1.Core.dll
NuGet Package: DevExpress.SpellChecker.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
path | String | A String object, representing a path to the registry key that holds the data. |
Remarks
You can write the SpellChecker options in the following root keys:
- “HKEY_CLASSES_ROOT”
- “HKEY_CURRENT_USER” (default key)
- “HKEY_USERS”
- “HKEY_LOCAL_MACHINE”
- “HKEY_CURRENT_CONFIG”
Use the following code to get the “Test” subkey in “HKEY_CURRENT_USER”. the “Test” subkey contains the “Spelling” key with the required data.
The code sample below gets the Test subkey in “HKEY_LOCAL_MACHINE”. The subkey contains the Spelling key with your data.
Note
Before saving to the RegistryKey, make sure you have permission to write to the corresponding registry.
When calling the SaveToRegistry method, the SpellChecker attempts to serialize data using the RegistryXtraSerializer. This serializer tries to find the key by the specified path, removes the key if it’s found and then, creates a new key and writes the required data there.
Call the SpellCheckerBase.RestoreFromRegistry method to restore the saved options.